Role Membership

  • Comments posted to this topic are about the item Role Membership

    http://brittcluff.blogspot.com/

  • OK, so why did my server return NULL ?

    Kenneth Spencer

    You never know: reading my book: "All about your computer" might just tell you something you never knew!
    lulu.com/kaspencer

  • As did mine. I want my point back :crying:

  • Mine did too, but you guys didn't read the question properly. It says select all that apply! And a little check in BOL would have revealed that IS_MEMBER can return 0, 1 or NULL, so no points back 😉

    --------------------------------------------------------------------------
    A little knowledge is a dangerous thing (Alexander Pope)
    In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)[/url]

  • Jan has is correct. There is 3 possible returns. If a valid Domain and Group are provided the function will a 0 or 1 depending on whether the user is a member or not. If the Domain or Group do not exist, the function will return a NULL.

    http://brittcluff.blogspot.com/

  • I think the quesiton could have been worded better. Something like "What are the valid values that can be returned by IS_MEMBER?"

    The question implied or I inferred that we had to use the exact code.

    😉

    I believe I read somewhere that this is deprecated or will be.

  • I agree the wording could have been better. D'oh!

  • Now what's so unclear about What are the valid return values for the following code: (select all that apply)? I've seen QotD's that were WAAAY more misleading.

    PS: I was not the one who submittted the question 😎

    --------------------------------------------------------------------------
    A little knowledge is a dangerous thing (Alexander Pope)
    In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)[/url]

  • Yeah it was perfectly easy to understand. Plus it would be a radio-button answer if it could only be one of them, multiple choice implies multiple results

  • skjoldtc (10/22/2009)


    I think the quesiton could have been worded better. Something like "What are the valid values that can be returned by IS_MEMBER?"

    The question implied or I inferred that we had to use the exact code.

    😉

    I believe I read somewhere that this is deprecated or will be.

    SELECT IS_MEMBER('DOMAIN\SuperUsers')

    Unless you're on an AD domain named DOMAIN, this will obviosly not work. However, if your NT admin had named your domain DOMAIN and created a group called SuperUsers within it, it would work.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Executed query on SSMS and got result NULL. HUUUHHH.

    Didn't read select all that apply and just selected NULL and lost a point.

    Don't know how many points I lost by not reading -- select all that apply. May be 30 - 40 points.

    My bad. Always repented on answer in hurry.

    SQL DBA.

  • I do think that these multi-selection questions should be worth at least 2 points.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • I tried this with

    1. Taking a valid domain and role and got 1 as output

    2. Taking a Invalid domain and role and got NULL as output

    3. But, when i tried a Valid domain and invalid role, still i'm getting NULL as output.

    Anybody help me with a sample scenario, to see 0 as output

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply