Cocc Cocc
Cocc Cocc

Reputation: 381

Import data from Internet to SQL Server 2008

Is there anyway that I could import the data (csv file) directly from the internet to SQL Server 2008?

Or must I download the file to the computer first, then import later?

Upvotes: 0

Views: 697

Answers (1)

Alberto Spelta
Alberto Spelta

Reputation: 3678

No, you can't import CSV file into SQLServer from URLs as source, the only valid path are:

  • local path from the server on which SQLServer is running

    BULK INSERT CsvTable FROM 'C:\CsvFile.csv' WITH (FIELDTERMINATOR = ',', ROWTERMINATOR = '\n')
    
  • a remote file, specify the UNC name

    BULK INSERT CsvTable FROM '\\ServerName\ShareName\Path\CsvFile.csv' WITH (FIELDTERMINATOR = ',', ROWTERMINATOR = '\n')
    

Upvotes: 1

Related Questions