I have a class with following property:
public char Status{get;set;}
This value is passed to T-SQL stored procedure to insert into a table.
The problem arises when no values is assigned to this property. It passes \0
to SP. In SP I am not able to figure out if value is present or not. Both of the following checks fail.
@value = '' OR @value IS NULL
What is the right way to check if passed parameter (@value CHAR(1)
) contains a valid value or not?
The answers to question What is the Null Character literal in TSQL? resolved my issue. Hence closing this question.