[SQL] INSERT ... SELECT FROM .... FOR UPDATE?

2006-07-14 Thread Mark Stosberg
Hello, This is a re-phrasing of question I asked recently, inquiring about a an approach I'm considering. My query is: > INSERT into item_hit_log (item_id, hit_date, hit_count) >SELECT item_id, CURRENT_DATE + CAST('1 day' AS interval), 0 > FROM items where item_state = 'available';

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