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)
 SQL Task

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2011-07-05 : 12:53:17
In execute sql task1, there is a sql code to return say 100 records with fields field1, field2, field3, etc...
Then in another task, I would like to have somethig like:

if field1 is null and field2 is not null then
insert into tblTest
update tblData
...

How is this done please?
Thanks

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-07-05 : 13:12:07
You wouldn't typically do that in SSIS. It would be a plain SQL command without using SSIS, or you'd modify the SQL in the task to pull only the rows that meet the IF condition, then direct them to a Transform (for UPDATE) or Data Source (for INSERT). Conditional processing within the task would get extremely (and unnecessarily) complicated.

I'm assuming you're talking about the same thing as here: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=162561
Go to Top of Page
   

- Advertisement -