Test if literal exists in variable

  • I've done some searching, but I must not be finding the right combination of keywords.

    I'm trying to get around the limitations in sql server reporting services inability to select NULL values when multiple values are allowed. I found some posts suggesting translating a text value made available via union into a NULL value.

    I have my query populating the parameter drop down correctly. I've tested and it returns correctly providing 'NULLID' as an option in the @parLang variable. What I would like to do is test if the value 'NULLID' exists in @parLANG. But I keep getting syntax errors.

    What I have (and isn't working) is this:

    ( ( LAN.language_NAME IS NULL ) AND ( 'NULLID' in @parLang ) )

    I also tried:

    ( ( LAN.language_NAME IS NULL ) AND ( @parLang contains 'NULLID' ) )

    also with no luck.

    Any help will be greatly appreciated.

    Thanks

  • ... Please kill this thread (and me) quickly. I was just missing parenthesis...

    ( ( LAN.language_NAME IS NULL ) AND ( 'NULLID' IN ( @parLANG ) ) )

  • It can happend to anyone 😉

Viewing 3 posts - 1 through 3 (of 3 total)

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