?
Solved

Print nvarchar doe not print any output

Posted on 2010-08-20
2
Medium Priority
?
590 Views
Last Modified: 2012-05-10
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
Comment
Question by:countrymeister
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 1000 total points
ID: 33489745
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
 
LVL 1

Author Comment

by:countrymeister
ID: 33489845
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question