Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP! CAN'T UPDATE ACROSS TABLES USING AGGREGATE????

Status
Not open for further replies.

stevenippon

Technical User
Aug 14, 2002
4
US
Hi
I'm trying to update Table1 from Table2, joining on key columns, but I want to update Table1 with the sum of data from Table2, e.g. something like

update Table1 set col2 = (select sum(col2) from Table2 where Table1.col1=Table2.col1.

Any ideas how to do this? I can do it in Sybase but I'm stuck when trying to do in Access,. (also does anyone know any decent SQL-92 websites?)

Thanks a lot
Steve
 
Not entirely clear what you mean, but it is possible to get aggregates in select queries in Access. There's an icon on the query toolbar with the Greek letter sigma on it. create such a query and use it as the input for an update query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top