Link to home
Start Free TrialLog in
Avatar of Star Gazr1
Star Gazr1Flag for United States of America

asked on

SQL Server 2000/Excel

I have a list of Customer Numbers in Excel that I am trying to find a match in SQL Server 2000.  I am looking for a way to link SQL to the spreadsheet.  Such as below:
Can this be done with SQL Server 2000?  Any ideas of other methods.  Thanks.

SELECT * INTO XLImport3 FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\test\xltest.xls;Extended Properties=Excel 8.0')...[Customers$]
Avatar of lcohan
lcohan
Flag of Canada image

How to import data from Excel to SQL Server
http://support.microsoft.com/kb/321686

How to use Excel with SQL Server linked servers and distributed queries
http://support.microsoft.com/kb/306397
Avatar of Star Gazr1

ASKER

I think I was not clear in my post. I don't want to import data from SQL to Excel, I want to do it the other way around. I want to query a list of numbers that I have an excel spreadsheet. Can I do this in SQL Server 2000?
SOLUTION
Avatar of lcohan
lcohan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In the Link it states and I am quoting from the link:
"The samples in this article import Excel data by using:

    SQL Server Data Transformation Services (DTS)
    Microsoft SQL Server 2005 Integration Services (SSIS)
    SQL Server linked servers"  ??

I appreciate you sending me a link but I am going to need more help then this
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
And here is a method to use it via Linked Server to Excel file via SQL 2000 Management Studio:

http://support.microsoft.com/kb/306397
I don't think I would be doing a Linked Server.  The operating system of the server is Microsoft Server 2003
Version of Excel is 2010 but the spreadsheet is saved as .xls  (not .xlsx)
Yes the Excel file is in C:\test
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, that is what I need the T-SQL code is best for me.