QUERY ABout Stored Procedure

A

AJAY LONARE

Hi All,
I Have a question like why we cant return a integer value from Stored
procedure just Like as a function.
I m Giving a example like when we execute a query in stored procedure then
if we dont find any record in database then we need to return a error code
so Please segesst me how we can do this..

Thanks,
-Ajay Lonare
 
S

Sprinks

Hi, Ajay.

I think your choices are:

- Make your procedure a function.
- Deal with the error directly in the procedure rather than returning a code
to another procedure or function.
- Scoping a public variable in a global module, and setting it such that
it's available to the downstream procedure.

Hope that helps.
Sprinks
 
Top