Bulk Insert

I was trying to bulk insert some data, and I found a page that had this (don't have the link anymore), which I used it to get it to work:

BULK INSERT tblYLT
FROM         'C:\YLT.txt' WITH (DATAFILETYPE = 'char', FIELDTERMINATOR = '\t', ROWTERMINATOR = '\n');

tblYLT was a table that I had already existing in a database, which I sucked in some data from YLT.txt.  tblYLT already had the columns that would be inserted, and the sizes must be the correct size, or an error will occur.  Also, don't have the header column in the file; they get sucked into the data.  There may be a flag for this. 

 

Comments

# re: Bulk Insert

Friday, February 29, 2008 9:30 PM by zxevil135

8PowUk r u crazzy? I told u! I can't read!

# re: Bulk Insert

Saturday, March 01, 2008 4:33 PM by zxevil136

pfNNEK r u crazzy? I told u! I can't read!

# re: Bulk Insert

Thursday, March 06, 2008 6:09 PM by zxevil134

vdotG8 r u crazzy? I told u! I can't read, man!

# re: Bulk Insert

Thursday, March 06, 2008 9:15 PM by zxevil141

EQ3uyU r u crazzy? I told u! I can't read!

# re: Bulk Insert

Friday, March 07, 2008 2:58 PM by zxevil150

PWLwd0 r u crazzy? I told u! I can't read!

# re: Bulk Insert

Friday, March 07, 2008 5:57 PM by zxevil151

Sx6v1k r u crazzy? I told u! I can't read!

# re: Bulk Insert

Friday, March 07, 2008 9:17 PM by zxevil152

KzOzPh r u crazzy? I told u! I can't read!

The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.