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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Link Excel Data with SQL server

Author  Topic 

sneupane
Starting Member

28 Posts

Posted - 2010-08-11 : 21:29:44
I have excel records that get updated everyday at the other department.I would like to use sql server 2008 to query that record. How would I do that? I tried using linked server in object explorer, but did not work.Could I be helped on this. I would appreciate any suggestion.

Sar

Sar

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-08-12 : 13:48:07
you mean pick up changes in excel automatically to SQL table? one way to do this is to ftp excel to shared location and use SSIS package to export the excel data to sql table.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-08-13 : 10:07:09
See if this helps
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sneupane
Starting Member

28 Posts

Posted - 2010-08-17 : 11:50:48
Thanks for your answers and links. I went through them and could not figure it out. Probably I did not make it clear. I have Excel 2007 and 2003 databases. they have 20 Columns and 20,000 rows. Each column is unique. I need to run a query using SQL Server 2008 management studio and get a report out of that excel file. I know how to import that excel file and make a SQL table (using import export functionality) . As this table gets updated everyday with 100's rows, I have to import into sql table everyday if I do this way. This file is owned by other department and I need to review the status of work. I just needed to save a query and run it and view the result. Could there be any possible way to do that?

Sar
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-08-17 : 11:53:28
you can pull the data as it is from excel and show it in report if you want. if thats your requirement, you can use OPENROWSET

http://www.sql-server-helper.com/tips/read-import-excel-file-p01.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sneupane
Starting Member

28 Posts

Posted - 2010-08-27 : 16:38:13
Thanks everyone for your help. I finally got the solution. Visakh and madhivanan, both of yours suggestions were really helpful but completely not enough. If your database is 64 bit sql server then the above process not gonna work coz Microsoft jet OLEDB 4 engine cannot work with 64 bit. So, I installed one more instance of SQL server 2005 express edition on my local machine.

Sar
Go to Top of Page
   

- Advertisement -