Role Membership

  • Britt Cluff

    SSCertifiable

    Points: 5083

    Comments posted to this topic are about the item Role Membership

    http://brittcluff.blogspot.com/

  • kaspencer

    SSCarpal Tunnel

    Points: 4317

    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

  • Chris Houghton

    SSCrazy

    Points: 2497

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

  • Jan Van der Eecken

    SSCrazy Eights

    Points: 8890

    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]

  • Britt Cluff

    SSCertifiable

    Points: 5083

    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/

  • OCTom

    SSChampion

    Points: 11755

    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.

  • jkraemer

    SSC Rookie

    Points: 36

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

  • Jan Van der Eecken

    SSCrazy Eights

    Points: 8890

    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]

  • paul.goldstraw

    SSCrazy

    Points: 2566

    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

  • mtassin

    SSC-Insane

    Points: 23096

    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]

  • SanjayAttray

    SSChampion

    Points: 13157

    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.

  • RBarryYoung

    SSC Guru

    Points: 143327

    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]

  • chinnulu

    Say Hey Kid

    Points: 684

    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 13 (of 13 total)

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