Excellent worked a treat.
I tried that - it didnt work, however i think i must have had a typo as it works now!!!
Cheers, Dan
From: "Patrick Dunnigan" <[EMAIL PROTECTED]> Reply-To: sqlite-users@sqlite.org To: <sqlite-users@sqlite.org> Subject: Re: [sqlite] OT: General SQL Question Date: Sat, 30 Apr 2005 08:20:41 -0400
The it would be something like
select A.item1,A.item2, B.col1, B.col2, C.supplier_name from audititems A, audits B, suppliers C where A.parentauditid = B.parentauditid and B.supplierid = C.supplierid and <.... rest of where clause ....>
----- Original Message ----- From: "Dan Keeley" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Saturday, April 30, 2005 7:36 AM Subject: Re: [sqlite] OT: General SQL Question
well audititems has a field parentauditid which links into audits. Audits has a supplierid field which is the key on suppliers..
From: "Patrick Dunnigan" <[EMAIL PROTECTED]> Reply-To: sqlite-users@sqlite.org To: <sqlite-users@sqlite.org> Subject: Re: [sqlite] OT: General SQL Question Date: Sat, 30 Apr 2005 07:16:55 -0400
It is possible depending on the make up of the tables.
post the table structures and index / keys and I'll help
----- Original Message ----- From: "Dan Keeley" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Saturday, April 30, 2005 6:38 AM Subject: [sqlite] OT: General SQL Question
Hi, I know this isnt related to SQLite, however i dont really know where else to ask.
I have 3 tables - Supplier, Audits and Audititems.
At the moment, i select and join audits and Audititems and it works great. However i need fields from the supplier chain, so i effectively need to do a 3 way join.
Is this possible?
Thanks! Dan