User Profile

Collapse

Profile Sidebar

Collapse
pagambar
pagambar
Last Activity: Feb 8 '08, 03:06 PM
Joined: Jan 24 '08
Location: St Albans
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • pagambar
    replied to aspnet_Roles and aspnet_usersinroles
    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
    See more | Go to post

    Leave a comment:


  • pagambar
    started a topic aspnet_Roles and aspnet_usersinroles

    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')
    ...
    See more | Go to post
No activity results to display
Show More
Working...