>Hi Cetin,
>
>Thank's for the riply. I try what you say, but didn't work. I think is in the 3 code line, but i need them.
>
>What is my query about.
>
>DocumentosCabcli=HeaderInvoices
>DoumentosLinCli=InvoicesLines
>Clientes=Clients
>Documentos=Documents
>
>I want to build a query to print invoices. I have in my HeaderInvoices Client.ID then i want to go to clients Table and get the client name, then in HeaderInvoices i have Document.ID the i want to go to Table documents and get Document Name.
>
>Any more help i apreciate.
>
>Thank's in Advance
>
>João Batista
Joao,
It was really long and hard to follow. As I understand you need to link a table into 2 others. It might require the SQL joins are done in a specific order without optimization. Try with a "force" clause :
select * from FORCE mytab1 left join ....
Cetin