List:General Discussion« Previous MessageNext Message »
From:Fayaz Yusuf Khan Date:June 10 2011 11:17pm
Subject:Re: How to find values which do not return any tuple in "IN" clause
View as plain text  
On Saturday 11 Jun 2011 4:06:27 AM Fahim Mohammad wrote:
> select * from  tablename where fieldname in ('aaa','bbb','ccc','ddd');
> How can I know how many out of four ('aaa','bbb','ccc','ddd') resulted in a
> miss OR which values do not return any tuple.
Perhaps this  would be what you're looking for?
"SELECT fieldname,COUNT(*) FROM tablename WHERE fieldname IN 
('aaa','bbb','ccc','ddd') GROUP BY fieldname;"

-- 
Fayaz Yusuf Khan
Cloud developer and designer in Python/AppEngine platform
Dexetra Software Solutions Pvt. Ltd., Kochi, Kerala, India
B.Tech. Computer Science & Engineering (2007-2011)
Model Engineering College, Kochi, Kerala, India
Registered Linux user #484201
fayaz.yusuf.khan@stripped
fayaz@stripped
+91-9746-830-823

Attachment: [application/pgp-signature] This is a digitally signed message part. signature.asc
Thread
How to find values which do not return any tuple in "IN" clauseFahim Mohammad11 Jun
  • Re: How to find values which do not return any tuple in "IN" clauseFayaz Yusuf Khan11 Jun
    • Re: How to find values which do not return any tuple in "IN" clauseFahim Mohammad11 Jun
  • Re: How to find values which do not return any tuple in "IN" clauseNuno Tavares11 Jun
  • Re: How to find values which do not return any tuple in "IN" clauseClaudio Nanni11 Jun
    • Re: How to find values which do not return any tuple in "IN" clauseClaudio Nanni11 Jun
Re: How to find values which do not return any tuple in "IN" clauseFahim Mohammad11 Jun
  • Re: How to find values which do not return any tuple in "IN" clauseNuno Tavares11 Jun