![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Firstly, apologies if this it the wrong place to ask! I have a stored procedure which builds some SQL in an nvarchar. I can, of course execute this SQL with EXEC(@mySQL), but how do I access the recordset that is returned *while still within the stored procedure*? Basically the SQL returns a single value every time, but based on wildly varying FROM and WHERE statements (hence why I can't use CASE statements). I'd like to do something like @myvalue = EXEC(@mySQL), but of course this doesn't work... Any help would be greatly appreciated. -- jo inferis |
#3
| |||
| |||
|
|
Firstly, apologies if this it the wrong place to ask! I have a stored procedure which builds some SQL in an nvarchar. I can, of course execute this SQL with EXEC(@mySQL), but how do I access the recordset that is returned *while still within the stored procedure*? Basically the SQL returns a single value every time, but based on wildly varying FROM and WHERE statements (hence why I can't use CASE statements). I'd like to do something like @myvalue = EXEC(@mySQL), but of course this doesn't work... Any help would be greatly appreciated. -- jo inferis |
![]() |
| Thread Tools | |
| Display Modes | |
| |