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)
 Excel to OLE DB destination

Author  Topic 

krishtxraj19
Starting Member

8 Posts

Posted - 2009-03-02 : 16:21:08
Hi all, i am loading data from Excel file to OLEDB destination. My Excel file data has a header record which tells me file name and record count. like below

Customer_US 1097
10031 USD 7/1/2001 0:00 100101
10032 USD 7/2/2001 0:00 100102
10033 USD 7/3/2001 0:00 100101
10034 USD 7/4/2001 0:00 100104
10035 USD 7/5/2001 0:00 100103

Firsr column is Customer_no, Currency , Date, Region_code

When i load into OLD DB destination i was getting the first row as NULL NULL NULL NULL.

But i want to load the header into one table and detail into another table.

When i was googling, i have see someone menstion to edit the Connection Manager properties and set IMEX = 1 to avoind NULL, i tried that but i got the following error message "Could not find installable ISAM"(Don't know what it is)

Can someone help to avoind NULLs and load into two table(Header and Detail)

Thanks
Krish

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-03 : 09:58:45
use a rownumber transformation in between excel source and your destination to generate rownumber, then use a conditional split task to insert only 1st row to first table and allthe rest to second table.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-03 : 09:59:12
also see

http://www.sqlis.com/post/Row-Number-Transformation.aspx
Go to Top of Page
   

- Advertisement -