SQL 2005 collation

collation database is SQL_Latin1_General_CP1_CI_AS
I created table for suport Chinese like below

how do set the column for support ?

CREATE TABLE [dbo].[DESC] (
 [ITEM_CODE] [nvarchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
 [DESCRIPTION] [nvarchar](200)  COLLATE Chinese_PRC_CS_AI NULL ,
 [ITEM_DETAIL] [nvarchar] (1000) COLLATE Chinese_PRC_CS_AI NULL 
) ON [PRIMARY]
GO
 
Insert DESC (ITEM_CODE,DESCRIPTION)
Values('xxx','}±^' COLLATE Chinese_PRC_CS_AI )
 
select description COLLATE Chinese_PRC_CS_AI as description from DESC
 
the column description  it becase like this "?????"

Open in new window

aimdsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh RetnakaranDatabase AdministratorCommented:
that code is working perfeclty on my system
0
aimdsAuthor Commented:
My collation database is SQL_Latin1_General_CP1_CI_AS
0
Aneesh RetnakaranDatabase AdministratorCommented:
the collation of the database dosn't matter when you specify the column collation, can you test it on a different database, possibly tempdb ?
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

aimdsAuthor Commented:
I tried new database and set collation SQL_Latin1_General_CP1_CI_AS  and then created table

CREATE TABLE [dbo].[DESC] (
 [ITEM_CODE] [nvarchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
 [DESCRIPTION] NVARCHAR(200)  COLLATE Chinese_PRC_CS_AI NULL ,
 [ITEM_DETAIL] [nvarchar] (1000) COLLATE Chinese_PRC_CS_AI NULL
) ON [PRIMARY]
GO

Insert [DESC] (ITEM_CODE,DESCRIPTION)
Values('xxx','}±^örÅ£t"KëP' COLLATE Chinese_PRC_CS_AI )

select * from [DESC]
it's the same old problem
xxx      ??????????"????      NULL

then I tried new database and set collation was Chinese_PRC_CS_AI  
and created table with the same script above  it's ok
0
aimdsAuthor Commented:
how do i create new table for support Chinese ?
0
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
Create the table as mentioned in your script above:

Make sure that Language packs are installed for both OS and for SQL Server too.

While insertingrecords into columns DESCRIPTION and ITEM_DETAIL, prefix the columns with 'N' like

Insert [DESC] (ITEM_CODE,DESCRIPTION)
Values('xxx',N'}±^örÅ£t"KëP')

Keyword 'N' mentions SQL Server that it is Unicode character and hence values will be stored and retrieved in the columns correctly.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aimdsAuthor Commented:
Thank you very much
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.