Unix Technical Forum

how to determine programatically what output of a sp will be?

This is a discussion on how to determine programatically what output of a sp will be? within the SQL Server forums, part of the Microsoft SQL Server category; --> Using Sql Srv 7 I know I can use the system sp's sp_stored_procedures and sp_sproc_columns to determine all the ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 01:32 PM
spiffo
 
Posts: n/a
Default how to determine programatically what output of a sp will be?

Using Sql Srv 7

I know I can use the system sp's sp_stored_procedures and sp_sproc_columns
to determine all the sps in a db, and what input parms there are for a
particular sp... but... if the sp returns a result set, is there a way to
find out the stru of that in a similar manner???


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 01:32 PM
helmut woess
 
Posts: n/a
Default Re: how to determine programatically what output of a sp will be?

Am Wed, 5 Oct 2005 09:04:14 -0500 schrieb spiffo:

> Using Sql Srv 7
>
> I know I can use the system sp's sp_stored_procedures and sp_sproc_columns
> to determine all the sps in a db, and what input parms there are for a
> particular sp... but... if the sp returns a result set, is there a way to
> find out the stru of that in a similar manner???


I never put time in finding an answer for this question but my first
thought is, that it cannot be possible, because i can write a procedure
like this:

create stored procedure myRandom as
if datepart(s,getdate()) % 2 = 1 select 'field_1', 1
else select 123, 'last'

So what is the struct of the resultset? It changes every second!

bye,
helmut
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:41 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com