Posted by David Mιndez on 04/03/07 12:39
Great!!!
thank you.
David.
"Ed Murphy" <emurphy42@socal.rr.com> wrote in message
news:4611e57f$0$27050$4c368faf@roadrunner.com...
> 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)
Navigation:
[Reply to this message]
|