|
-
Jul 5th, 2007, 04:00 AM
#1
Thread Starter
Fanatic Member
Join Excel with Table in SQLSERVER
can we do something like that without using OPENROWSET or OPENDATASOURCE?
thanks,
erick
-
Jul 5th, 2007, 05:03 AM
#2
Thread Starter
Fanatic Member
Re: Join Excel with Table in SQLSERVER
yes it can be done..after trying a couple of hours
using sp_addlinkserver to do that
after use it like usual query
read BOL for further information
[edit]: found another issue, i got this error when try to connect to Server DB
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "ExcelSource" returned message "Cannot start your application. The workgroup information file is missing or opened exclusively by another user.".
Msg 7399, Level 16, State 1, Line 2
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "ExcelSource" reported an error. Authentication failed.
Msg 7303, Level 16, State 1, Line 2
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "ExcelSource".
any idea?
regards,
erick
Last edited by erickwidya; Jul 5th, 2007 at 07:04 AM.
-
Jul 5th, 2007, 10:54 AM
#3
Re: Join Excel with Table in SQLSERVER
How about creating a temporary table and then import the data in to the table and then join as normal
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Jul 6th, 2007, 12:12 PM
#4
Thread Starter
Fanatic Member
Re: Join Excel with Table in SQLSERVER
not quite understand
it need to be execute against Network Server not local Server..
not sure how to work with this one
-
Jul 6th, 2007, 05:06 PM
#5
Re: Join Excel with Table in SQLSERVER
 Originally Posted by erickwidya
not quite understand
it need to be execute against Network Server not local Server..
not sure how to work with this one 
What I am trying to say is first create a temporary table in your SQL Server Database and then import the excel spreadsheet, via DTS, into that temporary table. Now join the temporary table with the other tables as you would normally do. I think you would be better off creating a Stored Procedure (SPROC) to accomplish this.
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Jul 8th, 2007, 07:29 PM
#6
Thread Starter
Fanatic Member
Re: Join Excel with Table in SQLSERVER
thanks Mark Gambo
DTS need to be run manually right? or do that via Job Schedule ?
it can be done but it can't be used since this is end user that involved..and this one needs to do it automatically..
i have this i create linked server then do that via OPENQUERY..
i'm not sure about the performance though
thanks,
erick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|