Guest User

Untitled

a guest
Oct 22nd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. Select
  2. @GroupId= CASE @WorkTypeId
  3. WHEN 1 THEN (SELECT COALESCE(@GroupId+',' ,'') + CAST(GroupId as VARCHAR(2)) as groupId1 FROM UserGroupRoleMapping
  4. WHERE UserId= @UserId and IsActive=1 AND GroupId != 4)
  5. WHEN 3 THEN (SELECT COALESCE(@GroupId+',' ,'') + CAST(GroupId as VARCHAR(2)) as groupId1 FROM UserGroupRoleMapping
  6. WHERE UserId= @UserId and IsActive=1 AND GroupId = 4)
  7. ELSE (SELECT COALESCE(@GroupId+',' ,'') + CAST(GroupId as VARCHAR(2)) as groupId1 FROM UserGroupRoleMapping
  8. WHERE UserId= @UserId and IsActive=1)
Add Comment
Please, Sign In to add comment