I have 200k records in one table and I want to insert these records into another table. I read about the bulk insert but the query I found on msdn website is just not making any sense.
This is the query
BULK INSERT AdventureWorks2012.Sales.SalesOrderDetail
FROM 'f:\orders\lineitem.tbl'
WITH
(
FIELDTERMINATOR =' |',
ROWTERMINATOR =' |\n'
);
What is f:\orders\lineitem.tbl
and the whole this is just not making any sense.
I have a table with four columns: id, frm, to1 and country
Same this in destination table
Any easy syntax will be helpful
I am using SQL Server 2008/12
BULK INSERT imports from an external data file. If you already have the data in a SQL Server table, then you should do something like:
INSERT INTO NewTable (field1, field2, field3)
SELECT field1, field2, field3 FROM OldTable
DO NOT point BULK INSERT at your SQL Server database file. The .tbl file referenced in your example code is to a text file with delimited fields.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With