ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Query to Insert record into another table using Select Statement in SQL Server<p>Hey <a class="username" rel="LoganTRK"> LoganTRK</a>,</p> <p>Please refer below query.</p> <p><span style="text-decoration: underline;"><strong>SQL</strong></span></p> <pre class="brush: sql">INSERT INTO TOTAL_G1 (ID, TOTAL, Name_Table) SELECT ID, Sum(total),&#39;Table1&#39; FROM Table1 WHERE Year = 2010 GROUP BY ID INSERT INTO TOTAL_G1 (ID, TOTAL, Name_Table) SELECT ID, Sum(total),&#39;Table2&#39; FROM Table2 WHERE Year = 2010 GROUP BY ID</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/214268/Query-to-Insert-record-into-another-table-using-Select-Statement-in-SQL-Server/https://www.aspforums.net:443/Threads/214268/Query-to-Insert-record-into-another-table-using-Select-Statement-in-SQL-Server/Thu, 22 Nov 2018 23:31:57 GMT