• I solved it with friend's help..instead of CAST(@BLANK_COUNT AS VARCHAR(5)) it should be CAST(@BLANK_COUNT AS VARCHAR(10))