16.20 - Example of Inserting and Activating a Site-Defined Collation Sequence - Teradata Vantage NewSQL Engine

Teradata Vantage™ NewSQL Engine International Character Set Support

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
created_date
March 2019
category
Configuration
User Guide
featnum
B035-1125-162K

The following example shows a BTEQ batch job that inserts into the DBC.CollationsV view a 256-character row containing the hexadecimal codes for a site-defined collation sequence, and then executes the CollInstallMulti macro to activate those codes as the new default.

You must restart the Teradata Database to complete the installation.

/* First delete from DBC.CollationsV any     */
/* existing definitions and then insert     */
/* the new definitions                      */
DELETE FROM DBC.CollationsV
 WHERE CollName = ‘NON_STANDARD’;
INSERT INTO DBC.CollationsV
( CollName
, CollInstall
, CollEqvClass
, CollOrderCS
, CollOrderUC )
VALUES
( ‘NON_STANDARD’
, ‘N’
/* CollEqvClass. Equivalence class.         */
/*  0 1 2 3 4 5 6 7 8 9 A B C D E F         */
, ‘000102030405060708090A0B0C0D0E0F’xb /* 0 */
||’101112131415161718191A1B1C1D1E1F’xb /* 1 */
||’202122232425262728292A2B2C2D2E2F’xb /* 2 */
||’303132333435363738393A3B3C3D3E3F’xb /* 3 */
||’406162636465666768696A6B6C6D6E6F’xb /* 4 */
||’707172737475767778797AB0B1B2B3B4’xb /* 5 */
||’B56162636465666768696A6B6C6D6E6F’xb /* 6 */
||’707172737475767778797AB6B7B8B9BA’xb /* 7 */
||’EAEBECEDBBBCBD80BFC0C1C2C3C4C5C6’xb /* 8 */
||’C7C8C9CACBCCCDCEEEEFF0CFD0D1D2D3’xb /* 9 */
||’F1D4D5D6F2D7F3D8D9DADBDCF4F5F6F7’xb /* A */
||’DDDEDFE0F8E1E2E3F9E4E5E6E7E8FAE9’xb /* B */
||’6161616161AEAB636565656569696969’xb /* C */
||’FC6E6F6F6F6F6F6FAC7575757579FB73’xb /* D */
||’6161616161AEAB636565656569696969’xb /* E */
||’FD6E6F6F6F6F6F6FAC7575757579FEFF’xb /* F */
/* CollOrderCS. Case-specific ordering      */
/*  0 1 2 3 4 5 6 7 8 9 A B C D E F         */
, ‘00000000000000000000000000000000’xb /* 0 */
||’00000000000000000000000000000000’xb /* 1 */
||’00000000000000000000000000000000’xb /* 2 */
||’00000000000000000000000000000000’xb /* 3 */
||’00010101010101010101010101010101’xb /* 4 */
||’01010101010101010101010000000000’xb /* 5 */
||’00000000000000000000000000000000’xb /* 6 */
||’00000000000000000000000000000000’xb /* 7 */
||’00000000000000000000000000000000’xb /* 8 */
||’00000000000000000000000000000000’xb /* 9 */
||’00000000000000000000000000000000’xb /* A */
||’00000000000000000000000000000000’xb /* B */
||’030507090B0101030305070903050709’xb /* C */
||’0003030507090B0D0103050709030002’xb /* D */
||’020406080A0000020204060802040608’xb /* E */
||’0002020406080A0C0002040608020000’xb /* F */
/* CollOrderUC. uppercase ordering          */
/*  0 1 2 3 4 5 6 7 8 9 A B C D E F         */
, ‘00000000000000000000000000000000’xb /* 0 */
||’00000000000000000000000000000000’xb /* 1 */
||’00000000000000000000000000000000’xb /* 2 */
||’00000000000000000000000000000000’xb /* 3 */
||’00010101010101010101010101010101’xb /* 4 */
||’01010101010101010101010000000000’xb /* 5 */
||’00010101010101010101010101010101’xb /* 6 */
||’01010101010101010101010000000000’xb /* 7 */
||’00000000000000000000000000000000’xb /* 8 */
||’00000000000000000000000000000000’xb /* 9 */
||’00000000000000000000000000000000’xb /* A */
||’00000000000000000000000000000000’xb /* B */
||’030507090B0101030305070903050709’xb /* C */
||’0003030507090B0D0503050709030001’xb /* D */
||’030507090B0101030305070903050709’xb /* E */
||’0003030507090B0D0503050709030001’xb /* F */);
/* Now install this collation as the collation default */
   EXECUTE CollInstallMulti (‘NON_STANDARD’);