Is it possible to use the update command to update TABLE1 using the sum of
values from TABLE2?

Such as.  UPDATE TABLE1 SET InStockQty = (SUM)T2.OnHand FROM TABLE1
T1,TABLE2 T2 WHE T1.MfgStyle = T2.StockNo

 

I think that I used this method in the past but I can't make it work now.  I
probably have the syntax wrong.  I tried working a sub-select into the
sequence but I could not get that to work either.  

For now, I have the update as part of a CURSOR and I go through the table
one record at a time; use a select to capture the sum value; then use the
update command.

 

John

 

Reply via email to