1

I have a temp table that has the same structure as a file text. But it doesn't seem to work. The error that it is displayed is

Cannot bulk load. The file "C:\Users\jacob_lasting\Desktop\MM.txt" does not exist

And the syntax that I used is this:

BULK INSERT tbltemp_SuccTable
FROM 'C:\Users\jacob_lasting\Desktop\MM.txt' --location with filename
WITH
(
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n'
)
GO

I read something that the file should be in SQL Server folder. Is that correct?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 3
    Is that file on the SQL Server's C:\ drive?? SQL BULK INSERT etc. always works only with local drive on the SQL Server machine. Your SQL Server cannot reach onto your own local drive. You need to put the file onto the SQL Server's C:\ drive and try again. – S M Dec 08 '16 at 06:33
  • Also ensure the logon your using has read permissions on C:. Chk more : http://stackoverflow.com/questions/2850205/cannot-bulk-load-the-file-c-data-txt-does-not-exist – S M Dec 08 '16 at 06:33
  • yes. The file should be in the Windows Server where SQL Server resides – Squirrel Dec 08 '16 at 07:08

0 Answers0