SSRS Report Builder - advice on excluding certain names from a query

  • Hello

    To cut a long story short I have some simple script that I'm sure could be coded better - it's just I don't know how.:sick:

    I have coded several lines like so:

    AND fields.name <> 'sale payment'

    AND fields.name <> 'initial transaction'

    and so on: there are about 12 lines like this. Is there a way of simplifying it, to gather in one line, for example?

    Any advice appreciated.

    Thanks

  • WHERE fields.Name NOT IN ('sale payment', 'initial transaction')

  • Thanks for the prompt and helpful response.

    However, can 'NOT IN' be used in 2008R2?

    If not, is there something similar?

    Thanks.

  • In a query? Sure... it's a really old syntax, if that's what you're wondering. (I remember it from Oracle in 1999...)

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

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