Question : Casting local variable int as varchar to concatenate into another string using transact-sql

I'm trying to add a local variable of type int to a string to display to the user but I keep getting a null value.
Code Snippet:
1:
set @denial_reason = 'Patient does not meet income criteria: ' + CAST(@poverty_level as varchar)

Answer : Casting local variable int as varchar to concatenate into another string using transact-sql

Try this

set @denial_reason = 'Patient does not meet income criteria: ' + CAST(ISNULL(@poverty_level,'') as varchar)
Random Solutions  
 
programming4us programming4us