Re: [SQL] Can I do this smarter?

2006-07-14 Thread Aaron Bingham
Aaron Bono wrote: On 7/13/06, *Joost Kraaijeveld* <[EMAIL PROTECTED] > wrote: I have three tables: customers, salesorders and invoices. Customers have salesorders and salesorders have invoices ( child tables have foreign key columns to their parent).

Re: [SQL] Can I do this smarter?

2006-07-14 Thread Joost Kraaijeveld
This is clearly the "Aaron helps day" ;-) Thanks, -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 web: www.askesis.nl ---(end of broadcast)--- TIP 6: explain analyze is

Re: [SQL] Can I do this smarter?

2006-07-13 Thread Joost Kraaijeveld
Hi Aaron, On Thu, 2006-07-13 at 22:52 -0500, Aaron Bono wrote: > SELECT >invoices.objectid, >invoices.invoicenumber, >invoices.invoicedate, >salesorders.customer, >customers.customernumber, >customers.lastname > FROM invoices > INNER JOIN salesorders ON ( >salesorders.o

Re: [SQL] Can I do this smarter?

2006-07-13 Thread Aaron Bono
On 7/13/06, Joost Kraaijeveld <[EMAIL PROTECTED]> wrote: I have three tables: customers, salesorders and invoices. Customers havesalesorders and salesorders have invoices ( child tables have foreignkey columns to their parent).I want to get a list of all invoices with their customers. This what I c

[SQL] Can I do this smarter?

2006-07-13 Thread Joost Kraaijeveld
I have three tables: customers, salesorders and invoices. Customers have salesorders and salesorders have invoices ( child tables have foreign key columns to their parent). I want to get a list of all invoices with their customers. This what I came up with: select invoices.objectid, invoices.i