Hello ,
what i need is to select informattion from certain tables and insert them into another table . insert two tables into total_g1 with id , total , and name of the table . Regards
SELECT ID, Sum(total) FROM Table1 WHERE Year = 2010 GROUP BY ID
SELECT ID, Sum(total) FROM Table2 WHERE Year = 2010 GROUP BY ID
INSERT INTO TOTAL_G1 (ID, TOTAL, Name_Table) VALUES ('@id','" @total "','Table1')"
INSERT INTO TOTAL_G1 (ID, TOTAL, Name_Table) VALUES ('@id','" @total "','Table2')"