Re: [SQL] Complex Update

2004-01-05 Thread Richard Huxton
On Saturday 03 January 2004 09:20, John Coryat wrote: > Problem: I have a table that has a field I want to plug with a value > from other tables. [snip] > I would expect it to look something like this: > > update orderheader set total = (select sum(amount) from orderdetail > where orderdetail.order

[SQL] Complex Update

2004-01-04 Thread John Coryat
Problem: I have a table that has a field I want to plug with a value from other tables. I can do it with a perl program and a loop, but want to do it with a single SQL statement. Is there a way to do an update that combines a select statement containing a "where" that uses a field from the row