help for a query
- by stighy
Hi, i've a problem for a table update. follow table structure:
Table1
tableid
...
...
productID_1
productID_2
productID_3
Table2
productID
Total
I've to totalize each product in table2.
For example:
SELECT COUNT(*) as tot, ProductID_1 FROM Table1 GROUP Table1
then the UPDATE table2 SET total =..??? (how can i do) WHERE productID_1 = ....
Hope you can help me.
Thank you