Fórum Left Join no interbase com campo null não retorna nada #51205
01/06/2005
0
galera, usei o seguinte select onde o campo cdclie e o cdcom estão nulos na tabela de vendas mas existem na tabela de clientes e de comissionados. Como fazer mostrar as vendas mesmo
eles estando nulos.
Select *
from
CabVendas
left join clientes on Cabvendas.Cdclie=Clientes.Cdclie
left join comis on CabVendas.CdCom=Comis.CdCom
where TBoleto=´V´ and CdLoja=´000´
OBS: NO ORACLE BASTA USAR (+) MAS NO INTERBASE SÓ TEM O LEFT JOIN O INNER JOIN ALGUEM PODE AJUDAR ??
eles estando nulos.
Select *
from
CabVendas
left join clientes on Cabvendas.Cdclie=Clientes.Cdclie
left join comis on CabVendas.CdCom=Comis.CdCom
where TBoleto=´V´ and CdLoja=´000´
OBS: NO ORACLE BASTA USAR (+) MAS NO INTERBASE SÓ TEM O LEFT JOIN O INNER JOIN ALGUEM PODE AJUDAR ??
Dr. Interbase
Curtir tópico
+ 0
Responder
Posts
02/06/2005
Rodolpho123
Tente desta maneira:
Nota que foi incluído a cláusula [b:8188eb4bbe]outer[/b:8188eb4bbe] na instrução
Select * from CabVendas left outer join clientes on Clientes.Cdclie = Cabvendas.Cdclie left outer join comis on Comis.CdCom = CabVendas.CdCom where TBoleto=´V´ and CdLoja=´000´
Nota que foi incluído a cláusula [b:8188eb4bbe]outer[/b:8188eb4bbe] na instrução
Responder
Gostei + 0
02/06/2005
Dr. Interbase
Obrigado, mas não trouxe nada mais uma vez.
Preciso de ajuda urgente.
Preciso de ajuda urgente.
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)