List:General Discussion« Previous MessageNext Message »
From:Nuno Tavares Date:June 10 2011 11:54pm
Subject:Re: How to find values which do not return any tuple in "IN" clause
View as plain text  
create table dim (value varchar(10), primary key(value));
insert into dim values ('aaa'),('bbb'),('ccc'),('ddd');

SELECT tablename.fieldname
FROM dim
LEFT JOIN tablename ON tablename.fieldname = dim
WHERE tablename.fieldname IS NULL;


If this is not what intended, I'd suggest you to spend a little more
effort in formulating a more clear question, maybe with an example.

-NT

Em 10-06-2011 23:36, Fahim Mohammad escreveu:
> Hi
> 
> select * from  tablename where fieldname in ('aaa','bbb','ccc','ddd');
> 
> return only the successful hit.
> 
> 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.
> 
> Thanks
> 
> Fahim
> 

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