Bulk insert error

  • I use code below to upload a csv file to SQL but got an error said that

    Msg 4860, Level 16, State 1, Line 1

    Cannot bulk load. The file "C:\Test.csv" does not exist.

    BULK

    INSERT Test

    FROM 'C:\Test.csv'

    WITH

    (

    FIELDTERMINATOR = ',',

    ROWTERMINATOR = ''

    )

    GO

  • Does the file c:\test.csv exist on the sql server or is this file on your local computer? Bulk insert is looking on the SQL Server's C: drive.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • Thank you. You are right.

    Once I move csv file to C of server it works fine.

    But, all data with " ". (csv file has text qualifier " ")

    How to fix it?

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply