简体   繁体   中英

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?

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') 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM