Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 unwanted multiple results

Author  Topic 

bazz
Starting Member

26 Posts

Posted - 2009-02-01 : 12:00:26
Hi
I have a stored procedure that executes a couple of stored procedure and based on those rults does a select.

One of the inner stored procedures has a select command that return as a result to my c# code. I can easily use NextResult on my reader. But the behaviour i'm after is just returning the main select

How can this select command in the inner stored procedure from being posted as outputs?

thanks very much

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-02-01 : 12:26:21
You can assign that resultset to a temp. table.
For more information how to do this, read here:
http://www.sqlteam.com/article/stored-procedures-returning-data

Webfred


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-02-01 : 12:30:48
Or perhaps you can change that stored procedure to have a parameter for controlling it to make the select or not...

Webfred


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-01 : 12:34:34
or just make inner procedure as a table valued function so that you can use it like a table in main procedure itself in joins
Go to Top of Page
   

- Advertisement -