Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select
- @GroupId= CASE @WorkTypeId
- WHEN 1 THEN (SELECT COALESCE(@GroupId+',' ,'') + CAST(GroupId as VARCHAR(2)) as groupId1 FROM UserGroupRoleMapping
- WHERE UserId= @UserId and IsActive=1 AND GroupId != 4)
- WHEN 3 THEN (SELECT COALESCE(@GroupId+',' ,'') + CAST(GroupId as VARCHAR(2)) as groupId1 FROM UserGroupRoleMapping
- WHERE UserId= @UserId and IsActive=1 AND GroupId = 4)
- ELSE (SELECT COALESCE(@GroupId+',' ,'') + CAST(GroupId as VARCHAR(2)) as groupId1 FROM UserGroupRoleMapping
- WHERE UserId= @UserId and IsActive=1)
Add Comment
Please, Sign In to add comment