Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ignore records...

Status
Not open for further replies.

Olivia123

MIS
Apr 19, 2007
29
US
I have this CASE statement and with these accts, with this Ent, and this desc I need to ignore, not to iclude the records...How would I write it? What to say after THEN?

Code:
 WHEN a.GL_ACC < '4001' AND A.GL_ENT = '2000' AND b.GLRD_DESC = 'NS' THEN

Thank You

Olivia :)
 
Maybe I dont need to use this in a CASE statement, please , let me know what would be the best way to ignore these records.

Thank you again
 
Where do you have this case statemtent? Or, is it prehaps a case expression?

If you don't want some of the rows in you result, you typically "filter" them away using a WHERE clause, e.g.

SELECT * FROM sometable
WHERE NOT (a.GL_ACC < '4001' AND A.GL_ENT = '2000' AND b.GLRD_DESC = 'NS')

Or like this, easier to read:
SELECT * FROM tablea, tableb
WHERE a.GL_ACC >= '4001'
AND A.GL_ENT <> '2000'
AND b.GLRD_DESC <> 'NS'
 
WHERE a.GL_ACC >= '4001' OR A.GL_ENT <> '2000' OR b.GLRD_DESC <> 'NS'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Of course, PHV! (I feel pretty stupid now...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top