Hi! Need Help. I have these 5 tables
1. PO (Purchase Order) 2. Transactions 3. Items 4. Suppliers 5. Customers To print my purchase order i Need the Below data Transactions.DocID, Transactions.Quantity, Transactions.Rate, Items.ItemName, Items.Unit, PO.Po_ID, PO.Po_Date, PO.QuoteNum, PO.PayTerms, PO.DeliveryDate, PO.VAt, PO.SrvcTax, PO.Amount, Suppliers.SName, Suppliers.Address1, Suppliers.Address2, Suppliers.City, Customers.CName, Customers.Address1, Customers.Address2, Customers.City My query returns everything but the corresponding Supplier and customer records. The query is as under. SELECT Transactions.DocID, Transactions.Quantity, Transactions.Rate, Items.ItemName, Items.Unit, PO.Po_ID, PO.Po_Date, PO.QuoteNum, PO.PayTerms, PO.DeliveryDate, PO.VAt, PO.SrvcTax, PO.Amount, Suppliers.SName, Suppliers.Address1, Suppliers.Address2, Suppliers.City, Customers.CName, Customers.Address1, Customers.Address2, Customers.City FROM Transactions INNER JOIN Items ON Transactions.ItemID = items.ItemID LEFT JOIN PO ON Transactions.DocID = PO.Po_ID LEFT JOIN Suppliers ON PO.SuppID = Suppliers.SID LEFT JOIN Customers ON PO.CustID = Customers.CustID where Transactions.DocID = "P-1001" I am a newbie and would be obliged if anyone can guide me. Using SQLite3. Many thanks and regards _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users