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 2005 Forums
 Express Edition and Compact Edition (2005)
 collation only for table

Author  Topic 

Shameej
Starting Member

6 Posts

Posted - 2010-05-12 : 03:17:07
Hi all,
Is there any way for specify collation property only for tables/column without specify for database

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-12 : 03:27:18
Yes.
In create statement you can use collation.
In select statement you can use collate.


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

Shameej
Starting Member

6 Posts

Posted - 2010-05-12 : 07:58:20
Hi webfred thanks for your post....

I used like this
ALTER TABLE tbName
ALTER COLUMN TechnicalComments Text COLLATE Greek_CS_AS

without specify collate for database
..
But i cannot insert the proper greek value into this column..
I am looking for a solution for this
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-12 : 08:06:25
For datatype TEXT you should use VARCHAR(max) because TEXT will disappear in future versions.

And in your case I think you should use NVARCHAR(max) so that the column can take unicode values.


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

Shameej
Starting Member

6 Posts

Posted - 2010-05-12 : 08:18:18
Sorry..Whatever it is I cannot change the column type...
any other way?
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-12 : 08:20:53
quote:
Originally posted by Shameej

Sorry..Whatever it is I cannot change the column type...
any other way?


Why not?
You where also able to change the collation.


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

Shameej
Starting Member

6 Posts

Posted - 2010-05-12 : 08:37:39
no need of argue....i can't change the type...
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-12 : 08:55:04
I am sorry but as far as I know the only solution is to change the type to a unicode type.


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

Shameej
Starting Member

6 Posts

Posted - 2010-05-12 : 09:07:52
actually the solution for your reply ..we can directly specify
the collation for column...please look at the example that i put
early in this topic...(But the DB should also specify collate)

my problem is same ..but without collate for DB

Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-12 : 09:13:24
To store greek values in that column the collation will not help.


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

Shameej
Starting Member

6 Posts

Posted - 2010-05-13 : 00:26:33
it will work for greeg too..
i worked it .....only thing is we need to set collation for column
and table along with DB


Go to Top of Page
   

- Advertisement -