December 9, 2011 at 12:09 pm
Hi,
I have a requirement to create a folder structure in a directory path say (c:\test) with the number of rows returned by my select statement...(like Select myname from mytable) if this query returns 10 rows then create 10 folders with names returned.
How can i create folders based on rows returened by a query in SSIS.
Any help on this...
Thanks [/font]
December 9, 2011 at 1:53 pm
Wow, thats an interesting request.. I question the methodology but ok..
I would use a data-flow task. The rows are generated by a source and a script transform does the directory create..
CEWII
December 10, 2011 at 11:09 am
Elliott Whitlow (12/9/2011)
Wow, thats an interesting request.. I question the methodology but ok..I would use a data-flow task. The rows are generated by a source and a script transform does the directory create..
CEWII
I'd probably do this a little differently. Use an ExecuteSQL task to get the list of folders and assign that to an object variable.
Feed that into a script task which iterates round the object variable and does the folder creations.
December 12, 2011 at 3:21 am
Elliott Whitlow (12/9/2011)
Wow, thats an interesting request.. I question the methodology but ok..I would use a data-flow task. The rows are generated by a source and a script transform does the directory create..
CEWII
Why should you question a methodology that can bring down a server to it's knees?
(OK, NTFS can hold more than 4 million subfolders into one folder, but still...)
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
December 12, 2011 at 2:36 pm
Koen Verbeeck (12/12/2011)
Elliott Whitlow (12/9/2011)
Wow, thats an interesting request.. I question the methodology but ok..I would use a data-flow task. The rows are generated by a source and a script transform does the directory create..
CEWII
Why should you question a methodology that can bring down a server to it's knees?
(OK, NTFS can hold more than 4 million subfolders into one folder, but still...)
I have had people say I'm crazy but thats just fine.. I think this methodology needs a bit more baking time before it is scrapped but it isn't near the worst I've seen and I didn't feel dirty answsering it. Unlike some where I simply will not give directions on how to do something flat out stupid. Sorry to be so blunt about it..
CEWII
December 12, 2011 at 11:26 pm
Elliott Whitlow (12/12/2011)
I have had people say I'm crazy but thats just fine.. I think this methodology needs a bit more baking time before it is scrapped but it isn't near the worst I've seen and I didn't feel dirty answsering it. Unlike some where I simply will not give directions on how to do something flat out stupid. Sorry to be so blunt about it..CEWII
No problem at all
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy