Cheers for the reply - Although it doesn't do exactly what I want but I went with
SELECT
a.itemname,
b.userid,
CONVERT(bit, CASE WHEN USERID IS NULL THEN 0 ELSE 1 END) AS Item
FROM
dbo.cbx_Item_1 AS a LEFT OUTER JOIN dbo.cbx_user_it ems AS b ON a.itemname = b.itemName
AND
b.userid = @userid
Cheers
User Profile
Collapse
-
aspnet_Roles and aspnet_usersinroles
I have a complex query which doesn't return what I need using outer joins.
The query i've tried is:
SELECT dbo.User_Roles_ Views.UserId, dbo.Roles_view. RoleName
FROM dbo.User_Roles_ Views RIGHT OUTER JOIN
dbo.Roles_view ON dbo.User_Roles_ Views.RoleName = dbo.Roles_view. RoleName
WHERE (dbo.User_Roles _Views.UserId = 'e69f320b-f1da-480e-9c54-9fa0680299d6')
...
No activity results to display
Show More
Leave a comment: