Groups | Blog | Home
all groups > sql server new users > may 2007 >

sql server new users : Bulk Insert Help


Hulicat
5/29/2007 6:37:40 PM
I am trying to do a bulk insert
here is the error:
Server: Msg 4860, Level 16, State 1, Line 1
Could not bulk insert. File 'c:\what.fmt' does not exist.

Here is what I am executing:

BULK INSERT callinsecuritycodeprovider
FROM 'C:\sample.txt'
WITH
(

FIRSTROW = 2
, FIELDTERMINATOR = ','
, FORMATFILE = 'c:\what.fmt'

, ROWTERMINATOR = '\n'


)

GO

both files reside on the root of the sql box and my user has full
access. I read some where people had the same error, however' my
problem seems to be different as the solutions did not work..

Any help would be greatly appreciated.
Hulicat
5/29/2007 7:28:16 PM
[quoted text, click to view]

Thanks that was @ least solved the initial error after I moved the
format file to a shared location:

However, it's throwing an error on the format file itself.
Server: Msg 4823, Level 16, State 1, Line 1
Could not bulk insert. Invalid column number in format file

Here is the format file
8.0
1 bigint "" 1 ID SQL_Latin1_General_Cp437_BIN
2 char 7 "" 2 SecurityNumber
SQL_Latin1_General_Cp437_BIN
3 bit "\n" 3 IsAssigned SQL_Latin1_General_Cp437_BIN



I have only three columns ID, SecurityNumber and IsAssiged in the
table

What am I missing?

Thanks!

Hari Prasad
5/30/2007 12:00:00 AM
Hello,

Does the SQL Server service startup account have read access in C drive root
in SQL Server machine?

Thanks
Hari

[quoted text, click to view]

AddThis Social Bookmark Button