October 11, 2011 at 10:49 am
Hi,
Is there a way to use the loop for a subset of files in a folder? Say top 10?
Thanks
October 11, 2011 at 12:52 pm
The only way I have been able to achieve this is to use xp_cmdshell and tsql. I am sure there is a method using powershell or a script component - you may want to try something like that.
Just load the results of your script into an object variable and then foreach loop over the object variable instead of the directory.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
October 11, 2011 at 1:46 pm
SQLRNNR (10/11/2011)
The only way I have been able to achieve this is to use xp_cmdshell and tsql. I am sure there is a method using powershell or a script component - you may want to try something like that.Just load the results of your script into an object variable and then foreach loop over the object variable instead of the directory.
Thanks Jason, that is what I'm currently doing. I was hoping there is another aproach.
October 11, 2011 at 1:56 pm
I would probably use a Script Task and generate the list manually from the file system and then feed that list to the FEL. I refuse to use xp_cmdshell at ALL.
CEWII
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply