Re: [GENERAL] Help on update that subselects other records in table, uses joins

2003-11-06 Thread Manfred Koizar
On Thu, 6 Nov 2003 00:50:06 +0900, Michael Glaesemann <[EMAIL PROTECTED]> wrote: >>> What I came up with was deleting and reinserting the relevant >>> ordercharges rows >> >> This might have unwanted side effects (think ON DELETE CASCADE). > >Good point. At this stage in my PostgreSQL progress, I h

Re: [GENERAL] Help on update that subselects other records in table, uses joins

2003-11-05 Thread Michael Glaesemann
Manfred, Thanks for taking the time to walk me through this. You've pointed out things I've noticed when writing queries and wondered about. (More specific comments—and commentary—below. What I came up with was deleting and reinserting the relevant ordercharges rows This might have unwanted sid

Re: [GENERAL] Help on update that subselects other records in table, uses joins

2003-11-05 Thread Manfred Koizar
On Wed, 5 Nov 2003 02:58:28 +0900, Michael Glaesemann <[EMAIL PROTECTED]> wrote: >> UPDATE ordercharges >>SET orderchargeasbilled = 0.065 * sale.orderchargeasbilled >> FROM orders AS o, ordercharges AS sale >> WHERE ordercharges.orderchargecode = 'S&H' >>AND ordercharges.orderid = o.orde