I have a stored procedure which is calling another stored procedure (cannot change this to a function). Depending on the result of the called stored procedure, I'd either like to throw an error, or carry on.
The stored procedure that is being called is looking for data in a table and returning 1 if it finds the data, or null if no data is returned.
How would the SQL look if I was using the following logic? If the stored procedure returns a value of 1, throw an error. If the stored procedure returns a NULL, carry on.
Aucun commentaire:
Enregistrer un commentaire