Hi all --
I am trying to simplify a long, inelegant "not like" filter with wildcards (below). I have not been able to condense the statement without errors. Many thanks for sharing your expertise on this board. -- THE NOOB
[DOC_CONTROL_ANALYST_NAME] not like 'CBL%' AND[DOC_CONTROL_ANALYST_NAME] not like 'SYBR%' AND[DOC_CONTROL_ANALYST_NAME] not like 'OXALIC%' AND[DOC_CONTROL_ANALYST_NAME] not like 'TRIZMA%' AND[DOC_CONTROL_ANALYST_NAME] not like 'QS12K%' AND[DOC_CONTROL_ANALYST_NAME] not like 'STPR%' AND
[DOC_CONTROL_ANALYST_NAME] not like '(G5%' AND
[DOC_CONTROL_ANALYST_NAME] not like 'RNase%' AND
[DOC_CONTROL_ANALYST_NAME] not like 'BLANK%' AND
[DOC_CONTROL_ANALYST_NAME] not like 'REL ATTUNE%' AND
[DOC_CONTROL_ANALYST_NAME] not like 'Part 2%' AND
[DOC_CONTROL_ANALYST_NAME] not like 'RELEASE BOMS%' AND
[DOC_CONTROL_ANALYST_NAME] not like 'Release new RMs%'
What is the error message?
delete [DOC_CONTROL_ANALYST_NAME] not like '(G5%' AND
from the expression
What happens?
Hi there --
The above expression works fine. But I would have liked to write it a form like [Data Item] not like ('A%', 'B%', 'C%') or something similar instead of using all of those AND statements.
When I try this approach I get the error:
QE-DEF 49 CCLException
QE-DEF-0260 Parsing error before or near position: 31 of: [APPROVED_BY] NOT LIKE ('A%' , 'B%')
QE-DEF-0261 QFWP - Parsing text: [APPROVED_BY] NOT LIKE ('A%' , 'B%')
like and not like do not accept an array, only single values. Perhaps yhou could use the substring function to some extend to cluster values that have the same length