I need to update a table with a select sum on 2 fields in another table.
For example, I need to update col1 of table #temp with sum of total from table1,
update col2 of table #temp with sum of cash from table1.
I have no idea how to script this, but maybe this will give you an idea of what I need.
set col1 =
select sum(total), sum(cash)
where #temp.id = 1