November 8, 2006 at 4:49 am
How can i move data from a Excel file to a Temp Table.
I tried using DTS but no luck.
Thanks
George
November 8, 2006 at 7:54 am
Can you give more information about exactly what is failing?
For example, are you using a SQL Task where you have a CREATE TABLE #TempTableName statement? Or it is failing when you use a DECLARE @TempTable table(@....) statement?
Are you generating a local or global temp object?
Did you remember to put the SQL task that produces the temp table object first and then add the task that will load it from Excel?
Information like that would be helpful. In general, using DTS to load data from Excel into a Database table is one of things that DTS is really good at so don't give up on it just yet.
November 8, 2006 at 10:52 pm
Thanks Kaddie Abdul, It worked through DTS, Thanks. I first created the Temp table in query analyser and then used the DTS to populate the data into that Temp table. Thanks
November 9, 2006 at 2:55 am
Hi there,
this is often very usefull for me
SELECT * FROM OPENDATASOURCE( 'Microsoft.Jet.OLEDB.4.0', 'Data Source=C:\myexcelfile.xls;Extended Properties=Excel 8.0')...Sheet1$
SELECT * FROM OPENDATASOURCE( 'Microsoft.Jet.OLEDB.4.0', 'Data Source="E:\myaccessfile.mdb"; User ID=;Password='  ...AccessTableName
Regards,
Hendrik
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply