Msg 8152, Level 16, State 14, Procedure my_procedure, Line 56
String or binary data would be truncated.
The statement has been terminated.
The 'my_procedure' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.
Trying to figure out the reason for this error, i am able to modify the data and it procedure executes successfully. The issue is the column the procedure is updating is of length 30 characters and the data being updated is 17 characters (including a white space 'errorhere string'). As soon as i remove the white space and the 'string' it works like a charm.
Tried removing the white space but did not help either, still get the same error.
To resolve the NULL value being returned, just added return (0) and it was gone. I was under the impression that by default if no return is specified a 0 (numeral) is returned by the procedure.
Google is my friend....
No comments:
Post a Comment