The value is 0 and if not find something in the code, it is setting the @STATUS_DESCRIPTION to null, i want to include the value zero as it could be zero or a numeric.
How do i change the line to accept this, there could be multiple values that i am just joining together in a status
DECLARE @SOURCE_CUST_TERMS_KEY int, @TARGET_CUST_TERMS_KEY int, @FOUND_CUST_TERMS_KEY INT, @STATUS_DESCRIPTION NVARCHAR(MAX), @STATUS_FL VARCHAR(1), @CUST_TERMS_KEY INT
SELECT @FOUND_CUST_TERMS_KEY = 0
SELECT @TARGET_CUST_TERMS_KEY = 0
SELECT @SOURCE_CUST_TERMS_KEY = 0
SELECT @CUST_TERMS_KEY = 1
---Is doing some data reads here etc, and if result is zero or a numeric want to return for the user
IF @TARGET_CUST_TERMS_KEY = 0
BEGIN
SELECT @STATUS_DESCRIPTION = @STATUS_DESCRIPTION + '5-CUST_TERMS_KEY' + ':' + CONVERT(nvarchar(20),@CUST_TERMS_KEY) + ' Is not found '
SELECT @STATUS_FL = 'N'
SELECT @CUST_TERMS_KEY = @TARGET_CUST_TERMS_KEY
END
PRINT 'CHECK ' + @STATUS_DESCRIPTION