Collate

The transformation of the collate depends on it's value, since it can be supported or not supported.

Currently these are the languages that are supported for the transformation, if they are found in the collate, they will be transformed to it's snowflake equivalent.

SqlSever

Snowflake

Latin1_General

EN

Modern_Spanish

ES

French

FR

If the language is not one of the above, the collate will be commented.

Also, since the collate in SqlServer comes with aditional specificacions, like CI, CS, AI and AS, only these are supported, if there are more and are not supported, they will be commented in the result.

Source

SELECT 'a' COLLATE Latin1_General_CI_AS;

SELECT 'a' COLLATE Modern_Spanish_CI_AS;

SELECT 'a' COLLATE French_CI_AS;

SELECT 'a' COLLATE Albanian_BIN;

SELECT 'a' COLLATE Latin1_General_CI_AS_WS;

SELECT 'a' COLLATE Latin1_General_CI_AS_KS_WS;

SELECT 'a' COLLATE Albanian_CI_AI;

Expected

SELECT 'a' COLLATE 'EN-CI-AS';

SELECT 'a' COLLATE 'ES-CI-AS';

SELECT 'a' COLLATE 'FR-CI-AS';

SELECT 'a'
-- ** MSC-ERROR - MSCINF0015 - COLLATION Albanian_BIN NOT SUPPORTED **
--           COLLATE Albanian_BIN
                               ;

SELECT 'a' COLLATE 'EN-CI-AS' /*** MSC-WARNING - MSCEWI4004 - COLLATION FOR VALUE WS NOT SUPPORTED ***/;

SELECT 'a' COLLATE 'EN-CI-AS' /*** MSC-WARNING - MSCEWI4004 - COLLATION FOR VALUES KS,WS NOT SUPPORTED ***/;

SELECT 'a'
-- ** MSC-ERROR - MSCINF0015 - COLLATION Albanian_CI_AI NOT SUPPORTED **
--           COLLATE Albanian_CI_AI
                                 ;

Let's see an example of collate in a Create Table

Source

CREATE TABLE TABLECOLLATE
(
    COL1 VARCHAR COLLATE Latin1_General_CI_AS
);

Expected

CREATE TABLE PUBLIC.TABLECOLLATE
(
COL1 VARCHAR COLLATE 'EN-CI-AS'
);

As yo can see, the transformatio of Collate inside a Select or a Table are the same.

Last updated