i have got 2 tables one is invoice and the other is product and the thing is for one incoice there can be many products.....
i'm making my database front end in vb6 and i'm making this invoice form where i'm displaying customer names and deliveryref names but in the invoice table i'm storing only there key fields for example custid, deliveryid and so forth.
but now the scenario is that i want all the information from all the tables using there id's what can i do...can somebody please help me .....this is what i have been trying to do
select invoice.*,products.*,agents.companyname,customer.f irstname,customer.lastname
from invoice
left join agents on (products.agentid=agents.agentid)
left join customer on (products.custid=customer.custid)
where invoice.invoiceno='8'