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 |
jeff06
Posting Yak Master
166 Posts |
Posted - 2007-04-23 : 13:46:37
|
into the sql query analyzer?Thanks.Jeff |
|
MutantNinjaLoungeSinger
Starting Member
14 Posts |
Posted - 2007-04-23 : 14:13:55
|
If by that you mean to ask if there is a way to import Excel into SQL, yes.http://support.microsoft.com/kb/321686If you want to query an excel document using sql query analyzer, I'm sure there's some hacky way of doing it through a linked excel table. |
 |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-04-23 : 15:06:54
|
Opendatasource works in both cases. |
 |
|
sshelper
Posting Yak Master
216 Posts |
|
jeff06
Posting Yak Master
166 Posts |
Posted - 2007-04-23 : 16:27:13
|
Thanksbasically, I want import an excel file into sql query analyzer as temprary table for further use. what is the simpliest way to do that?Thanks |
 |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-04-23 : 16:45:21
|
Use Opendatasource, you can find sample code in above links. |
 |
|
moonmonkey
Starting Member
4 Posts |
Posted - 2011-02-10 : 05:40:02
|
Does Excel need to be installed on the SQL Server, in order for the OPENROWSET command to work? I have tried the following statement on a number of servers:SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\temp\TTFAU.xls', 'SELECT * FROM [Template$]')..and the command only seems to work on my desktop PC, where Excel is installed. |
 |
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2011-02-10 : 07:15:32
|
There may be a "path issue" in that SQL server can't see the C:\ drive as it's local to your PC.Take Excel out of the equation 1st.Try to load a text file and see what error (or not) sql has with the path of the file you are trying to process. Remember the path is relative to the SQL Engine, and not relative to the client PC you are executing it from.Then once you have got that working, move onwards to invoking Excel. |
 |
|
|
|
|