Link to home
Start Free TrialLog in
Avatar of zachvaldez
zachvaldezFlag for United States of America

asked on

SQL syntax correction

I have this sql statement which supposed goal is to select items based on the description field only if they do not have
the word 'Not in" or  "Discontinued" in the beginning of the description field; s in

" Not in the list..." or "Discontinued item..." and so forth

SELECT Publisher,Book,Descrip,Cost, List,pubid,RowLastUpDtByOp,RowLastUpdtDtTi from Books where pubid = '276 ' and(descrip not like 'Not%' or descrip not like 'Discontinued %') order by id

For some reason I still get those data that has 'Not in" or "Discontinued' in the resultset.
Where am I making the mistakes?

ASKER CERTIFIED SOLUTION
Avatar of jdlambert1
jdlambert1
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial