Link to home
Start Free TrialLog in
Avatar of aimds
aimdsFlag for United States of America

asked on

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

Avatar of Aneesh
Aneesh
Flag of Canada image

that code is working perfeclty on my system
Avatar of aimds

ASKER

My collation database is SQL_Latin1_General_CP1_CI_AS
the collation of the database dosn't matter when you specify the column collation, can you test it on a different database, possibly tempdb ?
Avatar of aimds

ASKER

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
Avatar of aimds

ASKER

how do i create new table for support Chinese ?
ASKER CERTIFIED SOLUTION
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aimds

ASKER

Thank you very much