Friday, February 24, 2012

Change SQL Collation programmatically

hi all...

how can i change the collation of a table that i dynamically created during runtime??

i wanna change the default collation to Arabic

You start with Nvarchar, Nchar, NText, Nvarchar (max) and Nchar (max) columns then you use collation precedence that is you add the collation of the column in your DML(data manipulation langauge) and that is the collation posted below. I think you should also do column level collation. All you need is covered in the links below. Hope this helps.

146

nocase.256

Dictionary order, case-insensitive

SQL_Latin1_General_Cp1256_CI_AS_KI_WI

http://msdn2.microsoft.com/en-us/library/ms180175.aspx

http://msdn2.microsoft.com/en-us/library/ms144250.aspx


http://msdn2.microsoft.com/en-us/library/ms179886.aspx

|||

i created a table for collating a column with "Tamil Language" in sqlserver 2005

CREATE TABLE jobs1 ( job_id text IDENTITY(1,1) PRIMARY KEY CLUSTERED, job_desc varchar(50) COLLATE Indic_General_90 NOT NULL DEFAULT 'New Position - title not formalized yet', )

but it throws an error "

Msg 448, Level 16, State 2, Line 7

Invalid collation 'Indic_General_90'."

can any one help me.should i stall any new collation in sqlserver

No comments:

Post a Comment