• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 592
  • Last Modified:

Print nvarchar doe not print any output

I have a stored procedure which I want to debug
I have a few fields that are nvarchar(4000)

example @SqlString   nvarchar (4000)

This field is set to some text, when I do a print there is no output
PRINT @SqlString  

so when I do the follow exec sp_abc , i expected the print to output some information
If i add PRINT 'TEST' , i do see this being output
0
countrymeister
Asked:
countrymeister
1 Solution
 
cyberkiwiCommented:
If you are building up @sqlstring progressively, any time you add a NULL to it, the entire string becomes null and print null = no output.
0
 
countrymeisterAuthor Commented:
cyberkiwi, I added the following and I was able to see the data
SET CONCAT_NULL_YIELDS_NULL OFF

You are correct in your statement
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now