This content has been marked as final. Show 2 replies
You cannot call a stored procedure from a SELECT statement.1 person found this helpful
If SP_ANOTHER_PROC is simply returning data, however, it should not be defined as a stored procedure. It should be defined as, most likely, two different stored functions (and/or one stored function that returns a composite type). You can call stored functions from a SELECT statement presuming they meet the other criteria (the function cannot modify the state of the database, for example, and it cannot have OUT parameters (though it must return a value)).
I was leaning towards FUNCTIONS but had a SP that already did what I wanted, so thought I could just call the SP.