Reply to Re: Please Help me!!!

Your name:

Reply:


Posted by Ed Murphy on 04/03/07 05:26

David Méndez wrote:

> I need to find the members that exists on the following select queries (not
> union):
>
> SELECT DISTINCT CLIREAL FROM VENTAS WHERE CLIREAL NOT IN (SELECT CODE FROM
> CLIENTES)
> SELECT DISTINCT CLIREAL FROM VENTAS WHERE CLIREAL NOT IN (SELECT CODE FROM
> CLIENTCONV)
>
> Basically I need to choose the rows VENTAS.CLIREAL that do not exists in
> CLIENTES.CODE rows and that also do not exists in the CLIENTCONV.CODE rows.

select distinct clireal
from ventas
where clireal not in (select code from clientes)
and clireal not in (select code from clientconv)

Alternatively:

select distinct clireal
from ventas
where clireal not in (select code from clientes
union select code from clientconv)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация