Hi,
I've written a script which will execute a Sybase Stored Proc like this: exec $1 with $1 being the proc name.
I want my script to exit with a failure if the storedproc fails, i.e if the proc does not exist in the database or for any other data related failure.
I'm currently doing a if [ $? -eq 0 ] then SUCCESS else FAIL but this only traps the exit code from the isql program. Any failures that occured within the SQL isn't picked up on.
Could you please help! Thanks Stefan
I've written a script which will execute a Sybase Stored Proc like this: exec $1 with $1 being the proc name.
I want my script to exit with a failure if the storedproc fails, i.e if the proc does not exist in the database or for any other data related failure.
I'm currently doing a if [ $? -eq 0 ] then SUCCESS else FAIL but this only traps the exit code from the isql program. Any failures that occured within the SQL isn't picked up on.
Could you please help! Thanks Stefan