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 2005 Forums
 Transact-SQL (2005)
 Differences in results of nchar() and unicode() fu

Author  Topic 

Mnain
Starting Member

1 Post

Posted - 2008-04-03 : 18:43:14
Hi,

I am working on an application that uses accent characters.

SELECT nchar(256) returns A. But if I do

SELECT Unicode(A) , then it returns 65 i.e. the value for simple 'A' character. I am confused, because I have data in nvarchar fields,

but when I do string comparison then A and A are treated as equal.

Please let me know, what could be the issue.



Thanks

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-04-03 : 18:46:53
nchar(256) returns an "A" with a thingy on top.
nchar(65) returns the same as unicode('A')

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -