0

Using Microsoft SQL Server Management Studio. I am having an issue with inserting some characters into a database.

I read that you have to add a collate to the column to allow for some characters.

I need some characters from the Czech language. so I added the Czech collate (Czech_100_CI_AS) to the column but then some French characters were removed and can not be entered.

Can I not have multiple collates on a column? this seems would be a weird limitation

I tried this, with a "," but this gives an error on the comma

ALTER TABLE dbo.TestingNames 
ALTER COLUMN NameTesting VARCHAR(50) COLLATE Czech_100_CI_AS|, French_CS_AS

Edit: Ah I misunderstood what collate was meant to do, I didn't realize it was a codepage, i thought it was just an include.

Thanks, Changing it to Nvarchar seemed to have worked :) I actually thought I was using nvarchar /facepalm Thank you for pointing that out to me.

user1255276
  • 541
  • 2
  • 5
  • 20
  • 5
    A collation is mostly for sorting and equality, but also selects a codepage (for char/varchar). Try an `nvarchar` instead? [docs](https://learn.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support) – Hans Kesting Apr 21 '21 at 15:18
  • 1
    Is there a particularly reason that you don't using NVARCHAR data type ? – MertG Apr 21 '21 at 15:20
  • 1
    No, you can't! First example: try writing a word in cyrillic and japanese at the same time... other example: a text can either be case sensitive or not - it can't be both at the same time... same is valid for mostly all other settings you steer via collation. – Tyron78 Apr 21 '21 at 15:23
  • 1
    IF you look at the [official MS documentation on `COLLATE`](https://learn.microsoft.com/en-us/sql/t-sql/statements/collations?view=sql-server-ver15) - I would say **no**, there is no way to define more than one collation on a column. – marc_s Apr 21 '21 at 15:41

0 Answers0