Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sg2255551
Constraint Violating Yak Guru
274 Posts |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-01-14 : 08:12:54
|
[code]create table quotes( col1 varchar(100), col2 varchar(100), col3 varchar(100), col4 varchar(100), col5 varchar(100), col6 varchar(100), col7 varchar(100), col8 varchar(100), col9 varchar(100))goBULK INSERT quotesFROM 'C:\quotes.csv'WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\r\n')[/code] KH[spoiler]Time is always against us[/spoiler] |
|
|
sg2255551
Constraint Violating Yak Guru
274 Posts |
Posted - 2014-01-14 : 08:39:00
|
hiI mean how do I select directly from the URL instead of downloading the CSV files. Thanks |
|
|
sg2255551
Constraint Violating Yak Guru
274 Posts |
Posted - 2014-01-14 : 08:42:57
|
I did try something like thisExec sp_configure 'Show advanced options', 1goreconfiguregoExec sp_configure 'ad hoc distributed queries',1goreconfiguregoEXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1GOEXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1GOSelect * from openrowset('Microsoft.ACE.OLEDB.12.0', 'Text;Database=http://download.finance.yahoo.com/d/quotes.csv?s=USDTHB=X&f=sl1d1t1c1ohgv&e=.csv;HDR=No', 'Select * from quotes.csv')But to no result. How should I go about it? Thanks |
|
|
nagino
Yak Posting Veteran
75 Posts |
|
|
|
|
|
|