|
|
| Author |
Message |
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 154
|
|
|
|
| Is there any way we can refer to the results of a stored procedure and use it as a table in a single sql query. In other words can we incorporate a stored procedure in a sql query and based on the results of the Stored procedure filter out some rows? |
|
| Back to top |
|
 |
References
|
Posted: Tue Jul 22, 2008 9:13 pm Post subject: Re: Is there any way refer to the results of a stored procedure |
 |
|
|
 |
ashimer
Senior Member
Joined: 13 Feb 2004 Posts: 348 Location: Bangalore
|
|
|
|
| Nope |
|
| Back to top |
|
 |
ashimer
Senior Member
Joined: 13 Feb 2004 Posts: 348 Location: Bangalore
|
|
|
|
You can do this to an extend by calling a stored procedure from within a UDF or user defined function ... by a little tweaking ...
| Code: |
• Main query calls function.
• Function calls stored-procedure.
• Stored-procedure retrives the data
• Stored procedure returns result back to the function
• Function returns the result back to the main query.
|
But here make sure that the result set is only 1 ... Try it out |
|
| Back to top |
|
 |
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 154
|
|
|
|
| Thanks a lot, I kind of figured this out. I was looking for one without using a User function. Thanks though. |
|
| Back to top |
|
 |
|
|