What is the best way to update multiple fields in a record?
Table1
Field1 -primary key
Field2
Field3
Field4
Field5
Insert into Table1 t1 (field1,Field3,Field4,Field5) (select field1,sum(field3),sum(field4),sum(field5) from table2 t2 group by field1) where t1.field1=t2.field1
I know that doesn't work because it says the field1 already exists. But that is the psuedo code that I am trying to accomplish.
Table1
Field1 -primary key
Field2
Field3
Field4
Field5
Insert into Table1 t1 (field1,Field3,Field4,Field5) (select field1,sum(field3),sum(field4),sum(field5) from table2 t2 group by field1) where t1.field1=t2.field1
I know that doesn't work because it says the field1 already exists. But that is the psuedo code that I am trying to accomplish.