View previous topic :: View next topic
|
Author |
Message |
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
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 |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
Nope |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 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: 156
|
|
|
|
Thanks a lot, I kind of figured this out. I was looking for one without using a User function. Thanks though. |
|
Back to top |
|
|
|