I have a quite complex block of code containing nested selects , case statements , aggregrate functions etc etc.
This particular block of code has a very high reusabilty factor and I am therefore planning to use it in a routine I can call from any stored procedure requiring it.
At first I planned to use a view...but views do not accpet use of the case statement.
I have since created a stored procedure and have successfully called it from another procedure. The problem is, I don't know how to access the result set of the called procedure , in the caling procedure.
I inserted the resultset of the called procedure into a temporary table, but the calling procedure is falling over when I reference this table.
Thanks
This particular block of code has a very high reusabilty factor and I am therefore planning to use it in a routine I can call from any stored procedure requiring it.
At first I planned to use a view...but views do not accpet use of the case statement.
I have since created a stored procedure and have successfully called it from another procedure. The problem is, I don't know how to access the result set of the called procedure , in the caling procedure.
I inserted the resultset of the called procedure into a temporary table, but the calling procedure is falling over when I reference this table.
Thanks