Question : Use a SSIS package to query a .xls file, manipulate the data, then push to an Access2003 table (only landing on disk 1 time)

I would like to create an SSIS package to query a .xls file, use a pivot function, then push the results to an Access2003 table. I do not want to create staging table in a SQL server database unless I absolutely have to. I think this will be possible without landing the data to disk 2 or 3 times.

What I have done so far is:
1) Create a connection to the xls file
2) Added a "data flow" task
3) Added the .xls source to a pivot function
4) added the Pivot function to connect to a jet4 datasource for access2003

I am having problems with the pivot function.

I tried to add a pivot function to break the "hire" and "term" dates into columns, however I am getting this error:

"Error: 0xC02020CF at move from excel to access, Pivot [94]: Duplicate pivot key value "Original Hire Date"."

here is how the .xls file looks now:

DateType (Pivot value)                | Date
-----------------------                 |----------      
Original Hire Date                   | 01/01/2007
Last Working Day                   | 01/01/2008
Original Hire Date                   | 05/05/2007
Last Working Day                   | 05/05/2008


Here is what I want to do

HireDate               TermDate
---------               --------
01/01/2007      01/01/2008
05/05/2007      05/05/2008

However I keep getting the above error. I have attached the file so you can see what my pivot transformation looks like. I have attached an example .xls file so you can attach to it and view the pivot transformation. All values are fictitious. As you know, just rename the files to .dtsx and .xls.

Thanks for all your help.

Answer : Use a SSIS package to query a .xls file, manipulate the data, then push to an Access2003 table (only landing on disk 1 time)

Dear Friend,
You must have a SetKey or you cannot have duplate records in the PivotKey.
Check the attached project and excel file.
Maybe you need to prepare your original excel file in order to meet this requirement.
helped?
Regards!
Pedro
 
SSIS Package (rename to dtsx)
 
 
Excel File with example dataset (rename to xls)
 
 
BIDS image
BIDS image
 
Random Solutions  
 
programming4us programming4us