Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
yadav_anil782
Creator II

WHERE CONDISION ERROR

Hi Experts,

1st condision - i dont want "1,2,4,10 " from  BOOKING_STATUS column

2st condision-  i dont want  "APPROVED" and "INPROGRESS" from APPROVAL_STATUS colummn


i'm using this where condision for my requirement-

WHERE (BOOKING_STATUS <> '1' OR '2'OR '4'OR'10') AND (APPROVAL_STATUS <> 'APPROVED' OR APPROVAL_STATUS <> 'INPROGRESS');

4 Replies
sunny_talwar

Try this if both condition has to be met:

Where not Match(BOOKING_STATUS, 1, 2, 4, 10) and not Match(APPROVAL_STATUS, 'APPROVED', 'INPROGRESS');

If its either or conditions, then try this:

Where not Match(BOOKING_STATUS, 1, 2, 4, 10) or not Match(APPROVAL_STATUS, 'APPROVED', 'INPROGRESS');

swuehl
MVP

WHERE NOT MATCH(BOOKING_STATUS,'1','2','4',10') AND (APPROVAL_STATUS <> 'APPROVED' OR APPROVAL_STATUS <> 'INPROGRESS');

MayilVahanan

Hi

Try like this

Where Not Match(BOOKING_STATUS , 1,2,4, 10) And Not match(APPROVAL_STATUS, 'APPROVED' , 'INPROGRESS');

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
alexandros17
Partner - Champion III

If you want to use your original query write:

WHERE (BOOKING_STATUS <> '1' and BOOKING_STATUS <> '2' BOOKING_STATUS <> '4' BOOKING_STATUS <> '10') AND (APPROVAL_STATUS <> 'APPROVED' and APPROVAL_STATUS <> 'INPROGRESS');