January 28, 2009 at 6:10 am
He does say 'scripting operations' so I'm assuming he's talking about scripting objects etc..
Is this what you're referring to, Jeff, when you talk about a T-SQL solution? (String building?)
I've been pretty underwhelmed with both SQL-DMO and SMO when it comes to scripting and have on occasions used an xml / xsl solution to achieve a more custom result. [/url]
(but it's not everyone's cup of tea!)
Regards,
David.
January 28, 2009 at 6:12 am
Ninja's_RGR'us (1/28/2009)
I was subscribed to this thread as well. And Jeff only replied to it because someone else posted another solution a couple minutes before him.When replying to a thread, I never checked when the op started the thread, only if I have something valiable to add to it. When someone trolls here from google, the date of the thread and replies have no bearing on helping him towards a solution.
this is true....but I was only kidding!
January 28, 2009 at 10:36 am
David McKinney (1/28/2009)
He does say 'scripting operations' so I'm assuming he's talking about scripting objects etc..Is this what you're referring to, Jeff, when you talk about a T-SQL solution? (String building?)
I've been pretty underwhelmed with both SQL-DMO and SMO when it comes to scripting and have on occasions used an xml / xsl solution to achieve a more custom result. [/url]
(but it's not everyone's cup of tea!)
Regards,
David.
Sripting objects, doing stuff on the "outside" because they don't know a way to do it "inside" (like the supposedly impossible import I just got done writing at work), whatever. For example, I know lots of folks that will write a script to get file names from a directory... xp_DirTree works just fine and I don't have to go to the wood shed to find the tool. Yeah, I know... "Undocumented features can go away at the next service pack." So can documented ones... look what they did to the very well documented sp_MakeWebTask privs in 2k sp4. WHAM! Suddenly, it needs "SA" privs... broke a hell of a lot of code. Or how about what they did with the {f4} key functionality when they shifted from 2k to 2k5... all gone! Replaced by some POS filter technology in the object tree.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 28, 2009 at 10:39 am
David McKinney (1/28/2009)
Ninja's_RGR'us (1/28/2009)
I was subscribed to this thread as well. And Jeff only replied to it because someone else posted another solution a couple minutes before him.When replying to a thread, I never checked when the op started the thread, only if I have something valiable to add to it. When someone trolls here from google, the date of the thread and replies have no bearing on helping him towards a solution.
this is true....but I was only kidding!
Heh... me too! I ALWAYS have enough coffee even if I have to chew the grounds.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2009 at 12:54 am
Sripting objects, doing stuff on the "outside" because they don't know a way to do it "inside".
OK...I get you. I immediately thought more of 'script generation' i.e. Create Table etc.. (I hate the script generation in SSMS - hope it's improved in 2K8.)
And i'm always in admiration of those who use T-SQL to do the 'seemingly impossible', even if personally it often hurts my head too much, and I resort to more conventional means (or delegate!)
February 10, 2009 at 2:08 am
For example, I know lots of folks that will write a script to get file names from a directory... xp_DirTree works just fine
Hi Jeff,
Does this really work for getting a list of files? I can only get a list of subfolders from it. Am I missing a parameter? (My wife says I am.)
Thanks,
David.
February 10, 2009 at 2:23 am
....found it!
EXEC master..xp_dirtree 'C:\temp',@depth, @includefiles
e.g. EXEC master..xp_dirtree 'C:\temp',1,1
Viewing 7 posts - 16 through 21 (of 21 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