Advertisement
Ruslan_Rayanov

link to form from table

Oct 10th, 2020
662
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.45 KB | None | 0 0
  1. insert into @result
  2.     select
  3.         id id,
  4.         isnull(phone, '<i>Нет телефона</i>') phone,
  5.         '<a href="/human/'+cast(id as nvarchar)+'" class="btn btn-info ">'+ isnull(fio, '') + '</a>' fio,
  6.         iif(freelancer=1, 1, 0) freelancer,
  7.         isnull((select name from hr_statuses where id = statusID), '') statusID
  8.     from hr_humans
  9.     where (@filterItemID is null or  @filterItemID=depID)  -- если не задан itemID - то берем всех
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement