I have the following case statement:
ON_ERROR:
CASE @Err
WHEN 0 THEN INSERT INTO tErrorLog_BU (ErrNumber,ErrDescription) VALUES (@Err,'tErrorLog Truncate Error') ROLLBACK TRANSACTION RETURN(0)
If there is an error in the sql statements in the beginning, then it goes to ON_ERROR and goes through a case statement.
@Err is a int that is assigned after every sql statement in the beginning and is an integer (int)
I keep getting an error that there is incorrect syntax near the word CASE
Can you tell me what i am doing wrong?
THANKS
ON_ERROR:
CASE @Err
WHEN 0 THEN INSERT INTO tErrorLog_BU (ErrNumber,ErrDescription) VALUES (@Err,'tErrorLog Truncate Error') ROLLBACK TRANSACTION RETURN(0)
If there is an error in the sql statements in the beginning, then it goes to ON_ERROR and goes through a case statement.
@Err is a int that is assigned after every sql statement in the beginning and is an integer (int)
I keep getting an error that there is incorrect syntax near the word CASE
Can you tell me what i am doing wrong?
THANKS