Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Where statement

Here is my problem. I want to add an additional bit to the WHERE statement the code works fine up until I add (PROJECT_ID = 'S07050720' OR PROJECT_ID = 'S07050721' ); Can anyone advise me where I am going wrong. Thanks

(LABOUR_NO = 'MACH ADDS') OR

(LABOUR_NO = 'MACH MODS') OR

(LABOUR_NO = 'TEST RWORK') OR

(LABOUR_NO = 'TEST ADDS') OR

(LABOUR_NO = 'TEST MODS') OR

(PROJECT_ID = 'S07050720' OR PROJECT_ID = 'S07050721' );



2 Replies
Not applicable
Author

Maybe you mean this:


((LABOUR_NO = 'MACH ADDS') OR
(LABOUR_NO = 'MACH MODS') OR
(LABOUR_NO = 'TEST RWORK') OR
(LABOUR_NO = 'TEST ADDS') OR
(LABOUR_NO = 'TEST MODS'))
AND

(PROJECT_ID = 'S07050720' OR PROJECT_ID = 'S07050721' );


Not applicable
Author

I don't see any wrongs in your code, but I believe that there is no need in grouping the two statements marked in green with a single parantesis. Try separating the two and see of your code works.

It that does not work try changing the OR with a match command:

match(PROJECT_ID, 'S07050720', 'S07050721') > 0