SQL com Left Out Join ?

Delphi

23/11/2003

Olá!
Como faço a seguite Query usando Left Out join.

Select *
From Acrecb A, Clientes C, Vendedores V, Cobranca B, Planoconta P
Where A.codcli = C.codcli and //...clientes
A.codvend = V.codvend and //...vendedores
A.codcobr = B.codcobr and //...tipo de cobranca
A.codplano = P.codplano and //...plano de contas
A.dtvcto Between dt_inicio dt_final
Order by C.nome,A.dtvcto

Desejaria preservar os registros da tabela ACRECB caso algum reg. nos arquivos relacionados nao fossem encontrado.

T+

ANT.CARLOS/SP


Ant.carlos/sp

Ant.carlos/sp

Curtidas 0

Respostas

Afarias

Afarias

23/11/2003

select * from acrecb A
left join clientes C on (A.codcli = C.codcli)
left join vendedores V on (A.codvend = V.codvend)
left join cobranca B on (A.codcobr = B.codcobr)
left join planoconta P on (A.codplano = P.codplano)
where A.dtvcto between :dt_inicio and :dt_final
order by C.nome, A.dtvcto


T+


GOSTEI 0
POSTAR