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 |
shubhada
Posting Yak Master
117 Posts |
Posted - 2007-04-11 : 05:15:47
|
Hi, I have one excel sheet with data and I want to import the excel sheet data into database.So how I can import the data into database using SQL statement?SQLTeam |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
shubhada
Posting Yak Master
117 Posts |
Posted - 2007-04-11 : 06:05:06
|
insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D:\testing.xls;', 'SELECT * FROM [SheetName$]') select * from colorsi tried the above query but i am getting the following error.Plz let me know about this errorServer: Msg 7399, Level 16, State 1, Line 1OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error.SQLTeam |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-11 : 06:09:08
|
That is for EXPORT.You have to make sure that the path to the file is relative to the server NOT your computer.Peter LarssonHelsingborg, Sweden |
|
|
|
|
|