Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 sql is getting truncated

Author  Topic 

bsvnhll
Starting Member

6 Posts

Posted - 2009-04-13 : 06:48:41
Hi,

I have a sql which is some around 400 characters.
Basically the sql is formed by concatinating with other variable.
For that reason i have declared the variable with datatype as nvarchar(4000).

and then tried to assign the concatinated two variable value to the variable.
and when i am trying to print the SQL using SELECT , the sql is getting truncated.

Select variable

Why is the sql is getting truncated? What could be the problem?

How could we resolve this problem?

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2009-04-13 : 10:29:10
If you try
select len(variable)
and that shows the expected length, then it is an artifact of the query analyzer. In query analyzer, under Tools->Options, there should be a setting that allows you to tell how many characters to output. By default, it is set at 256. (I am guessing because I don't have SQL 2000 enterprise manager).
Go to Top of Page

bsvnhll
Starting Member

6 Posts

Posted - 2009-04-14 : 01:39:28
Thanks a lot,

Now it is working fine.
Go to Top of Page
   

- Advertisement -