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 2008 Forums
 SSIS and Import/Export (2008)
 SSIS query

Author  Topic 

sandesh.ravi
Posting Yak Master

110 Posts

Posted - 2011-10-31 : 06:31:30
Hi,
I am importing a XML file. it has almost 40 columns. All rows except the last row needs to be inserted in table1 and the last row is of summary row and it needs to be inserted in table2. To identify the i need to check the 2 columns for null values.

Kindly let me know the way to achieve this.

Thanks,
Sandesh

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-31 : 07:29:36
you can use a data flow task with XML source and OLEDB destinations to table 1 and table 2. Add a conditional flow task in between to check value of nullable fields and add two outputs based on it. link one output with not null values to table 1 and other output with null values to table2

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sandesh.ravi
Posting Yak Master

110 Posts

Posted - 2011-10-31 : 07:44:42
Thank you Visakh.

Thanks,
Sandesh
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-31 : 08:14:25
wc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -