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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Values getting cut off
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

29 Posts

Posted - 01/24/2005 :  14:03:05  Show Profile  Reply with Quote

It was the default setting I needed to change.

Edited by - yoggi123 on 01/24/2005 14:17:10


United Kingdom
22859 Posts

Posted - 01/24/2005 :  14:11:54  Show Profile  Reply with Quote
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!)

Go to Top of Page

Cybernetic Yak Master

11752 Posts

Posted - 01/24/2005 :  14:44:20  Show Profile  Visit spirit1's Homepage  Reply with Quote

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

Go with the flow & have fun! Else fight the flow
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000