July 24, 2008 at 5:32 am
Hi,
Maybe it is a stupid question, but is it a way to obtain only the structure of a stored procedure
Meaning, for the next result set:
ID Name Age
----------------
1 ss 10
2 g 55
3 h 77
4 ss 99
5 ss 6
The execution of my stored procedure takes long time and at some point I want only the header of the result set: I just want the columns and I am not allowed to modify the stored procedure.
Is it a way to obtain this? I mean something like Information schema.[?]
Thank you
Daniela
July 24, 2008 at 8:48 am
There is nothing in the Information_Schema unless you want to parse the text of the sp. You could just send in criteria, if there are any, that you know will return no data and you will get an empty result set with just the column names.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
July 24, 2008 at 8:51 am
Do you know any method to have access to the stored procedure text from C#?
Daniela
July 24, 2008 at 9:08 am
Sure execute sp_helptext [proc name]. It will really be a pain to try to parse that result to find column names since there can be n selects in a procedure and each could produce a different result set.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
July 24, 2008 at 9:11 am
Yes, true (about the pain) 🙂 But anyway thanks a lot for your help, it is good to know what it is possible.
Daniela
Daniela
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply