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)
 double byte characters

Author  Topic 

dcarva
Posting Yak Master

140 Posts

Posted - 2006-09-13 : 17:33:25
Hello,

I have a table with a field of type NVARCHAR. I can manually paste a chinese or japanese character into the field in Enterprise Manager. However, when I do the same thing via an INSERT statement, it the character always shows up as a '?' within Enterprise Manager. Does the Insert statement have to do any special conversion?

Thanks
Danny

DustinMichaels
Constraint Violating Yak Guru

464 Posts

Posted - 2006-09-13 : 17:37:54
What do you get if you select the rows in query analyzer?
Go to Top of Page

dcarva
Posting Yak Master

140 Posts

Posted - 2006-09-13 : 17:42:00
When doing a SELECT from Query Analyzer, it shows the characters correctly.

Thanks
Go to Top of Page

dcarva
Posting Yak Master

140 Posts

Posted - 2006-09-13 : 17:44:41
What I mean is that if I pasted the character and then do the SELECT, it shows up fine. But if I try it via INSERT, then it shows up as ?.
Go to Top of Page

dcarva
Posting Yak Master

140 Posts

Posted - 2006-09-13 : 17:48:25
Figured it out. I needed to append 'N' before any unicode literal. Thanks
Go to Top of Page
   

- Advertisement -