0

I am trying to write a bulk import routine so that i will be able to import text files or csv files to SQL i have tried this and it's giving me the following error message. P: is the drive where the file is in currently.

USE [XYZABQ]
GO
CREATE TABLE CSVTest
(ID INT,
[Name] VARCHAR(40),
Surname VARCHAR(40),
BirthDate DATETIME (10))
GO
BULK
INSERT CSVTest
FROM 'P:\csvtest.txt'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
GO

Error Message
Msg 4861, Level 16, State 1, Line 2
Cannot bulk load because the file "P:\csvtest.txt" could not be opened. Operating system error code 3(error not found).

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by MeSampath
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.