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
 SQL Server Development (2000)
 Values getting cut off

Author  Topic 

yoggi123
Starting Member

29 Posts

Posted - 2005-01-24 : 14:03:05
Thanks.

It was the default setting I needed to change.

Kristen
Test

22859 Posts

Posted - 2005-01-24 : 14:11:54
I don't image it has anything to do with your problem, but given that you are working with both varchar and Nvarchar should you be using DATALENGTH() instead of LEN() ??

Or do they behave the same (I thought that for Nvarchar DATALENGTH() was required/preferred - but maybe I'm thinking from the wrong end!)

Kristen
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-01-24 : 14:44:20
[code]
declare @a varchar(10)
declare @b nvarchar(10)
select @a = '12345', @b = '12345'

select len(@a) as [len A], datalength(@a) as [datalength A],
len(@b) as [len B], datalength(@b) as [datalength B]

len A datalength A len B datalength B
----------- ------------ ----------- ------------
5 5 5 10
[/code]

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -