[SQL] Can I do this?

2003-01-17 Thread Wei Weng
I want to select some data out of database A, and insert them into database B. Is it possible to do in one SQL query?   Thanks   Wei  

Re: [SQL] Can I do this?

2003-01-17 Thread Josh Berkus
Wei, > I want to select some data out of database A, and insert them into database B. Is it possible to do in one SQL query? > No. Use a Perl script. -- -Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TIP 2: yo

Re: [SQL] Can I do this?

2003-01-17 Thread Bruce Momjian
See /contrib/dblink, or use an application that attaches to both databases, or use COPY somehow. --- Wei Weng wrote: > I want to select some data out of database A, and insert them into database B. Is it >possible to do in

[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

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

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-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-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).