tags:

views:

38

answers:

1

here's my condition:

([Panels] like '*something*' or [Panels] like '*something1*') AND ([Panels] like '*something2*' or [Panels] like '*something3*')

another words, here is the logic:

[Panels] has to be one of the following (IT_AMPH | AMPH_SN | AMPH_S) AND it has to be one of the following: (IT_BARB | BARB_SN | BARB_S)

A: 

Try using In

[Panels] In ('IT_AMPH','AMPH_SN ','AMPH_S')
AND [Panels] In ('IT_BARB','BARB_SN','BARB_S')

This will return True if [Panels] is in both lists.

If you want to use exclusively and and or... well, it can be a real headache:

([Panels]='IT_AMPH' AND [Panels]='AMPH_SN ' AND [Panels]='AMPH_S')
OR ([Panels]='IT_BARB' AND [Panels]='BARB_SN' AND [Panels]='BARB_S')

Hope this helps you.


If you need to use wildcards, you can replace the = with Like:

([Panels] Like '*IT_AMPH*' AND [Panels] Like '*AMPH_SN*' AND [Panels] Like '*AMPH_S*')
OR ([Panels] Like '*IT_BARB*' AND [Panels] Like '*BARB_SN*' AND [Panels] Like '*BARB_S*')

Hope this helps you.

Barranka
thank you but this is incorrect since i need wildcards
I__
You can replace '=' with 'Like', and you can use wildcards
Barranka