[thelist] SQL 2000 update statement

Ingrid Z evoltlist at rogers.com
Mon Aug 12 20:52:01 CDT 2002

[ Picked text/plain from multipart/alternative ]
Hi all,

Been lurking around, and haved learned so much from everybody!
I am stuck on a SQL update.
The scenario:
I am pulling product sales from my shopping cart table and inserting into another table. Each day, I grab the previous day's sales and copy into a summary table. This table gets downloaded daily to a text file. I want to subtotal the order for each user, but I don't do that in the original shopping cart table (orders are to be processed manually, not on-line).
I am trying to update the summary table with the order total for one user, in one column, even though that user may have bought 3 products, thus having 3 rows.

Right now, I can put the order total in each row with that user name. Is there a way to update only ONE column that has the same 'LastName", instead of updating all ?
Currently, am using this...
Update ProdSummary Set TheTotalOrder = @total where LastName = @last

I want to update only ONE row that has that LastName..

I have scanned the on-line help, but find no answers... and I really hate deadlines.

Can anyone (Rudy) help?

Thanks so much in advance for any/all replies,


More information about the thelist mailing list