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)
 call a separate task accordingly

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2009-10-23 : 11:46:37
Hi,
USing the script task I can get the name of the file being processed and pass it on to a variable.

Question:
How is it possible to start a separate task based on the name of the file?

i.e.
File being processed:

if it is "file1.csv" then execute the dataflow task 1
if it is "file2.csv" then execute the dataflow task 2
if it is "file3.csv" then execute the dataflow task 3
...

Thanks

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-10-23 : 12:18:28
You can also get the file name using the ForEach Loop Container.

You can use the Precedence Constraint expression to direct the flow to a certain task. Or do this in the script task.
Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2009-10-23 : 12:26:57
hi, which one is simplest and how is it done please?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-10-23 : 13:06:28
you can use conditional task
Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2009-10-24 : 13:46:13
Thank you
Go to Top of Page
   

- Advertisement -