Ruslan_Rayanov

Change GetItems for humans table

Oct 10th, 2020
34
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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='' or  @filterItemID=depID)  -- если не задан itemID - то берем всех
  10.  
RAW Paste Data