You should try
INSERT INTO ExistingTable (Columns,..) SELECT Columns,... FROM OtherTable
Have a look at INSERT
and SQL SERVER – Insert Data From One Table to Another Table – INSERT INTO SELECT – SELECT INTO TABLE
Related Posts:
- Selecting COUNT(*) with DISTINCT
- Self Join to get employee manager name
- SQL query to select dates between two dates
- How can I do an UPDATE statement with JOIN in SQL Server?
- Column name or number of supplied values does not match table definition
- What is a stored procedure?
- How do I UPDATE from a SELECT in SQL Server?
- When should I use CROSS APPLY over INNER JOIN?
- INSERT statement conflicted with the FOREIGN KEY constraint – SQL Server
- INSERT statement conflicted with the FOREIGN KEY constraint – SQL Server
- How do I escape a single quote in SQL Server?
- T-SQL split string based on delimiter
- How do I escape a single quote in SQL Server?
- IDENTITY_INSERT is set to OFF – How to turn it ON?
- SQL Server FOR EACH Loop
- Best way to do nested case statement logic in SQL Server
- The multi-part identifier could not be bound
- DateTime2 vs DateTime in SQL Server
- The ALTER TABLE statement conflicted with the FOREIGN KEY constraint
- How to parse XML data in SQL server table
- What is the equivalent of ‘describe table’ in SQL Server?
- Add a column with a default value to an existing table in SQL Server
- Error converting data type varchar to float
- I want to use CASE statement to update some records in sql server 2005
- What represents a double in sql server?
- The backend version is not supported to design database diagrams or tables
- Conversion failed when converting the varchar value ‘simple, ‘ to data type int
- SELECT DISTINCT on one column
- Exclude a column using SELECT * [except columnA] FROM tableA?
- Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 4 (Year)
- TSQL PIVOT MULTIPLE COLUMNS
- How to format a numeric column as phone number in SQL
- SQL “select where not in subquery” returns no results
- Equivalent of Oracle’s RowID in SQL Server
- Is it possible to specify condition in Count()?
- SQL Server dynamic PIVOT query?
- Error converting data type varchar
- Temporary table in SQL server causing ‘ There is already an object named’ error
- I want to use CASE statement to update some records in sql server 2005
- How to calculate age (in years) based on Date of Birth and getDate()
- ORDER BY items must appear in the select list if SELECT DISTINCT is specified
- Solutions for INSERT OR UPDATE on SQL Server
- Text was truncated or one or more characters had no match in the target code page including the primary key in an unpivot
- How can I group by date time column without taking time into consideration
- SUM OVER PARTITION BY
- CASE IN statement with multiple values
- Update query using Subquery in Sql Server
- Varchar invalid for Sum operator
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- What is the difference between “INNER JOIN” and “OUTER JOIN”?
- What is the difference between “INNER JOIN” and “OUTER JOIN”?
- What is an MDF file? [closed]
- Case in Select Statement
- ORA-00904: invalid identifier
- Inserting multiple rows in a single SQL query? [duplicate]
- Conversion failed when converting date and/or time from character string while inserting datetime
- Conversion failed when converting date and/or time from character string while inserting datetime
- Insert Data Into Temp Table with Query
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- error, string or binary data would be truncated when trying to insert
- How to create Temp table with SELECT * INTO tempTable FROM CTE Query
- NOT IN vs NOT EXISTS
- Must declare the scalar variable
- T-SQL split string
- Must declare the scalar variable
- Rename column SQL Server 2008
- Why do we need “Relationships” between tables at all?
- Efficiently convert rows to columns in sql server
- Nested select statement in SQL Server
- Case statement in MySQL
- Drop a temporary table if it exists
- How do I perform an IF…THEN in an SQL SELECT?
- How Stuff and ‘For Xml Path’ work in SQL Server?
- SQL Server : Arithmetic overflow error converting expression to data type int
- Sql Server equivalent of a COUNTIF aggregate function
- How to calculate percentage with a SQL statement
- Inserting data into a temporary table
- Can a foreign key be NULL and/or duplicate?
- Why does NULL = NULL evaluate to false in SQL server
- CREATE VIEW must be the only statement in the batch
- Difference between JOIN and INNER JOIN
- What is the meaning of the prefix N in T-SQL statements and when should I use it?
- What is the difference between JOIN and UNION?
- Error Code: 2013. Lost connection to MySQL server during query
- “CASE” statement within “WHERE” clause in SQL Server 2008
- Get day of week in SQL Server 2005/2008
- Warning: Null value is eliminated by an aggregate or other SET operation in Aqua Data Studio
- Query error with ambiguous column name in SQL
- What is the difference between Scope_Identity(), Identity(), @@Identity, and Ident_Current()?
- Each GROUP BY expression must contain at least one column that is not an outer reference
- incorrect syntax error CREATE VIEW must be the only statement in the batch
- how to drop partition without dropping data in MySQL?
- Sql Server string to date conversion
- How to find sum of multiple columns in a table in SQL Server 2005?
- Check if table exists in SQL Server
- Operand type clash: int is incompatible with date + The INSERT statement conflicted with the FOREIGN KEY constraint
- Find all tables containing column with specified name – MS SQL Server
- Difference between numeric, float and decimal in SQL Server
- SQL Server Insert if not exists
- SQL Server: Invalid Column Name