Just a shot in the dark without being able to see the code, but if you're using the variable in any concatenation operation, you might want to set the CONCAT_NULL_YIELDS_NULL option off and try it again. With the option on, any concatenation with a NULL will change the entire string to NULL.