Hi Gurus,
I have a question on using the Like function. Can we use the Like function for mutliple values, for Ex: [Region] Like ('%A','%B','%C') or should we be using it as ([Region] Like ('%A') and [Region] Like ('%B') and [Region] Like ('%C') ).
Please help me with your valuable suggestions.
Thanks
You will never find any region that is like %A AND %B since it can only end in one letter.
I don't believe that like allows multiple values. Therefore go with your second approach, but use OR rather than AND
Hi,
Personally I would opt for:
[Region] ends with 'A' OR [Region] ends with 'B' OR [Region] ends with 'C'
:)
MF.
Hello v2k4u,
Do you absolutely have to use LIKE ?
Same this can be achieved as such....ignore it if you have to use LIKE.
substring([Region],character_length([Region])) in ('A','B','C')
-Cognos810
You may also be interested in seeing this thread (http://www.cognoise.com/index.php?topic=22355.0).