SSRS NOT LIKE expression

  • Hi all,

    I need to filter my dataset in SSRS. There only comparision operators are LIKE. There is no NOT LIKE comparision operator.

    How do you go about using the NOT LIKE comparision operator when creating filters for your dataset?

    I am not using a SQL dataset, else I would have put the NOT LIKE filtering in the SQL Statement.

    I am reading a Cube.



  • Depending on what your data is like, I can think if a possible solution.

    If your data is a string variable @string then

    @string NOT LIKE 'Xyz'

    could be replaced with ...

    replace(@string,'Xyz','zzz') < 'zzz'

    This relies on the sort order placing 'zzz' higher than any other 3 character string your data set will contain.

    Replace 'Xyz' with your search pattern, and 'zzz' with the equivalent length string of z's

    Caveat - I haven't tried this - it is just a thought!:-)


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

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