I have a question about stored procedure insert errors.
I have 2 columns:
RSIGN | NO_SIGN |
---|---|
NULL | 0 |
The default value of RSIGN
is NULL, for NO_SIGN
it’s 0.
I tried like this:
IF (@RSIGN IS NULL) OR (LEN(@NO_SIGN) = 0)
INSERT INTO #Errors
VALUES (-1, 'Please enter data in RSIGN or NO_SIGN)
END
However, if no data is entered in these two columns, the error message will not appear.
I want to make it if any one column have value changed, the message does not appear.
Thanks for any help.
2