neilkonitzer
Programmer
I'm not really sure if this can be done, but I'll give it a shot and see if someone's done this...
I am attempting to create a Select statement where one of the returned values is the output from an existing stored procedure. Here is an example of what I am trying to accomplish...
Select CatName, CatAge, CatColor, (exec sp_GetCatFood CatAge) As CatFood
From Animals
In the example above, the sp_GetCatFood stored procedure would take the record level value of CatAge as an input parameter and subsequentially return a value.
Unfortunately, using 'exec' in a select statement is not allowed.
I would prefer to keep the use of the stored procedure instead of a UDF to eliminate duplication of code maintenance.
Any ideas??? Thanks in advance!!
Neil Konitzer
Freisoft
I am attempting to create a Select statement where one of the returned values is the output from an existing stored procedure. Here is an example of what I am trying to accomplish...
Select CatName, CatAge, CatColor, (exec sp_GetCatFood CatAge) As CatFood
From Animals
In the example above, the sp_GetCatFood stored procedure would take the record level value of CatAge as an input parameter and subsequentially return a value.
Unfortunately, using 'exec' in a select statement is not allowed.
I would prefer to keep the use of the stored procedure instead of a UDF to eliminate duplication of code maintenance.
Any ideas??? Thanks in advance!!
Neil Konitzer
Freisoft