
with the above query, I get those entries with Status=10,20 and 90.
I want to check for entries which have Status=90 alone, and which DO NOT HAVE Status=10 or Status=20. I did below, but seem not correct.



Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 1, 2013, 9:38 PM EDT
try like this
Regards,
Iftikar
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 1, 2013, 7:49 PM EDT
Try like this
select *from table_name where TRIM(PHSTAT)='90'
Regards,
Iftikar
TAN WhoAMIRank #5,790 · 286 reputationPosted Aug 1, 2013, 8:19 PM EDT
but 923-0020 does contain Status=10,20, see below:
I want to extract out those entries with Status = 90 alone, and does not have Status=10 or Status=20.
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 1, 2013, 8:49 PM EDT
Regards,
Iftikar
Posted Aug 1, 2013, 8:52 PM EDT
It looks like somewhere the records are duplicating. Make sure, your join conditions are correct and it is not forming any duplicate records.
If possible can be post the query as text instead of screenshot?
TAN WhoAMIRank #5,790 · 286 reputationPosted Aug 1, 2013, 9:22 PM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 1, 2013, 9:28 PM EDT
Regards,
Iftikar
TAN WhoAMIRank #5,790 · 286 reputationPosted Aug 1, 2013, 9:35 PM EDT
what is t.PoId?
Posted Aug 1, 2013, 9:36 PM EDT
TAN WhoAMIRank #5,790 · 286 reputationPosted Aug 1, 2013, 9:43 PM EDT
Posted Aug 1, 2013, 9:44 PM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 1, 2013, 9:47 PM EDT
Regards,
Iftikar
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 1, 2013, 9:49 PM EDT
ON
Regards,
Iftikar
TAN WhoAMIRank #5,790 · 286 reputationPosted Aug 1, 2013, 9:58 PM EDT
TAN WhoAMIRank #5,790 · 286 reputationPosted Aug 1, 2013, 10:24 PM EDT