You can't do it that way. Your table has two columns and you are deliniating the text in the file at all. For example, try this, it works:
File:
JohnGreed
KevinHeath
CREATE TABLE Names
(
Firstname varchar(20)
)
BULK INSERT Names FROM 'c:\names.txt'
select * from Names
drop table Names
If you are specifying more than one column, you need to provide it MUCH more information that just "hey, here's a file for my bulk insert".
Look in BOL for Bulk Insert. That, plus the above example, should get you started.
========================
Scott Klein
Author of:
Professional SQL Server 2005 XML
Professional WCF Programming: .NET Development with the Windows Communication Foundation
Professional LINQ
========================
|