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
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Import data from multiple excel files to SQL

Author  Topic 

jagd08
Starting Member

1 Post

Posted - 2009-02-09 : 13:03:21
I am new to SSIS so wanted opinion on how to go about my case.

I need to port huge amount of data from excel models over to SQL Server 2005. The data is located in a specific directory structure for eg.

\\[server address]\[subdirectory1]\[property]\[subdirectory2]\[FileName] which is made up of
[YearSpecific_fileprefix] + [cycle_type] +[property] + .xls

so for eg. these are the files that would need to be processed for one property xyz. The same excercise needs to be repreated for 50 other properties.

The aplhabets a,b,f,s in the .xls file name means as below
a stands for : actuals
b ----do----- : budget
f ----do----- : forecast
s ----do----- : summary

\\fctx1\cta\ctadata\xyz\voldata\P08axyz.xls
\\fctx1\cta\ctadata\xyz\voldata\P08bxyz.xls
\\fctx1\cta\ctadata\xyz\voldata\P08fxyz.xls
\\fctx1\cta\ctadata\xyz\voldata\P08sxyz.xls
\\fctx1\cta\ctadata\xyz\voldata\P09axyz.xls
\\fctx1\cta\ctadata\xyz\voldata\P09bxyz.xls
\\fctx1\cta\ctadata\xyz\voldata\P09fxyz.xls
\\fctx1\cta\ctadata\xyz\voldata\P08sxyz.xls

The format meaning the col names in excel are the same across all 50 properties and same applies to summary files.

I need advice on whether I should create two table one to house the data for all a,b,f data with a columns names from the .xls file in additon to a additional column ID and a cycyle type and month so I can associate what cycle/month the data was loaded for.

The issue I am running in to is that the additional columns do not exist in the .xls files so when I try importing SQL error's out.

So long story I need to know what's the best approach and how to go about implementing the detail steps/tasks.

Any advice/assistance is highly appreciated.

TIA
JD

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-09 : 13:11:41
for creating additional column values you can use derived column task available in data flow task.
Go to Top of Page
   

- Advertisement -