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
 General SQL Server Forums
 Database Design and Application Architecture
 Unicode Support for SQL Server

Author  Topic 

Xajid
Starting Member

2 Posts

Posted - 2010-03-02 : 13:03:54
Hey Guys!
I am using SQL Server 2005. i want to insert a Unicode character, "Hair Space". its Unicode is \U200A but when i Apply the query
INSERT INTO Tab VALUES (N'\U200A')
it simply inserts the text "U200A".
I really need Help, how to insert this minutes Unicode space?

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-03-02 : 15:11:01
-- declare a table variable for testing
declare @Tab table(testvalue nvarchar(255))
-- insert Hair Space using decimal value of 200A in nchar-function
insert @Tab values (nchar(8202))
-- show result
select * from @Tab
-- test to see the space
select '>'+testvalue+'<' from @Tab



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

Xajid
Starting Member

2 Posts

Posted - 2010-03-04 : 03:53:42
Well bro wat should i do if i want to update an existing record?? i have name field containing "FirstName LastName" .. i want to embed Unicode Hair Space in between First and last Name
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-03-04 : 04:19:13
Look at this to get an idea:

declare @test nvarchar(255)
declare @HairSpace nchar(1)

set @HairSpace = nchar(8202)
set @test = N'FirstName LastName'
select @test union all
select replace(@test,' ',@HairSpace)
select N'FirstName'+ @HairSpace + N'LastName'



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -