Solved

Print nvarchar doe not print any output

Posted on 2010-08-20
2
589 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 250 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

729 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