November 27, 2008 at 9:15 am
hi all,
I can't remember how to do this and my google searches haven't been fruitful... but i know it's possible
i forgot what it is but there is either a SET statement or a system proc that i can use to see the output columns a procedure will produce without actually executing that procedure... any idea?
November 27, 2008 at 1:15 pm
You can use SET FMTONLY ON and then call the stored procedure to view the columns returned by the proc without executing it...remember to turn it OFF after you are done...
November 27, 2008 at 1:28 pm
Try this:
Select * From INFORMATION_SCHEMA.ROUTINE_COLUMNS
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
November 27, 2008 at 1:56 pm
INFORMATION_SCHEMA.ROUTINE_COLUMNS only returns data for table valued functions and not for stored procedures right?
November 27, 2008 at 2:14 pm
Yup, because a proc doesn't have a defined output. It's possible to have a procedure that returns various different resultsets (or none at all) depending on parameters passed.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 27, 2008 at 8:20 pm
thanks!
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply