Charlatat Posted November 20, 2006 Share Posted November 20, 2006 Ok, this is my query, SELECT * FROM TABLE WHERE (resultcode = "TNS") AND (ondate = #somedate#)This is working fine, however I need to eliminate all results that have a resultcode of "SLE,SLD,SL1, or SL2" between now and the "somedate".Can someone help me with the syntax? Thanks Link to comment Share on other sites More sharing options...
jteixeira Posted November 20, 2006 Share Posted November 20, 2006 DELETE FROM Table WHERE resultcode= ('SLE' or 'SLD' or 'SL1' or 'SL2') and ondate between '2006-11-13 00:00:00.000' and #somedate# Link to comment Share on other sites More sharing options...
Charlatat Posted November 20, 2006 Author Share Posted November 20, 2006 Ok, I think I worded my problem wrong. I don't need to delete records. I need to skip over records that meet the criteria I stated before AND not have a resultcode of "SLE,SLD,SL1,SL2" between now and the provided date. That way, I only get the records who have a resultcode of "TNS" on a certain date, and NOT the ones who have the other resultcode since the provided date. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now