SQL$HELP_OLD72.HLB  —  SET_CHARACTER_LENGTH, Examples
    Example 1: Setting the character length to octets

    SQL> set character length 'octets';
    SQL> show connection current;
    Connection: RDB$DEFAULT_CONNECTION
    Default alias is RDB$DBHANDLE
    Default catalog name is RDB$CATALOG
    Default schema name is SMITH
    Dialect: SQLV40
    Default character unit: OCTETS
    Keyword Rules: SQLV40
    View Rules: SQLV40
    Default DATE type: DATE VMS
    Quoting Rules: SQLV40
    Optimization Level: DEFAULT
    Hold Cursors default: WITH HOLD PRESERVE NONE
    Quiet commit mode: OFF
    Compound transactions mode: EXTERNAL
    Default character set is DEC_MCS
    National character set is DEC_MCS
    Identifier character set is DEC_MCS
    Literal character set is DEC_MCS
    Display character set is UNSPECIFIED

    Alias RDB$DBHANDLE:
            Identifier character set is DEC_MCS
            Default character set is DEC_MCS
            National character set is DEC_MCS
    SQL> /*
    ***> Create two domains: one uses LATIN9, a single-octet character
    ***> set, and one uses KANJI a fixed multi-octet character set.
    ***> */
    SQL> create domain LATIN9_DOM char(8) character set ISOLATIN9;
    SQL> create domain KANJI_DOM char(5) character set KANJI;
    %SQL-F-CHRUNIBAD, Number of octets is not an integral number of characters
    SQL> /*
    ***> Because KANJI is a fixed multi-octet character set, using two
    ***> octets for each character, you must specify the size as a
    ***> multiple of two.
    ***> */
    SQL> create domain KANJI_DOM char(8) character set KANJI;
    SQL> show domains;
    User domains in database with filename MIA_CHAR_SET
    KANJI_DOM                       CHAR(8)
             KANJI 4 Characters,  8 Octets
    LATIN9_DOM                      CHAR(8)
             ISOLATIN9 8 Characters,  8 Octets
    SQL>

    Example 2: Setting the character length to characters

    SQL> set character length 'characters';
    SQL> show connection current;
    Connection: RDB$DEFAULT_CONNECTION
    Default alias is RDB$DBHANDLE
    Default catalog name is RDB$CATALOG
    Default schema name is SMITH
    Dialect: SQLV40
    Default character unit: CHARACTERS
    Keyword Rules: SQLV40
    View Rules: SQLV40
    Default DATE type: DATE VMS
    Quoting Rules: SQLV40
    Optimization Level: DEFAULT
    Hold Cursors default: WITH HOLD PRESERVE NONE
    Quiet commit mode: OFF
    Compound transactions mode: EXTERNAL
    Default character set is DEC_MCS
    National character set is DEC_MCS
    Identifier character set is DEC_MCS
    Literal character set is DEC_MCS
    Display character set is UNSPECIFIED

    Alias RDB$DBHANDLE:
            Identifier character set is DEC_MCS
            Default character set is DEC_MCS
            National character set is DEC_MCS
    SQL> /*
    ***> Create two domains: one uses LATIN9, a single-octet character
    ***> set, and one uses KANJI a fixed multi-octet character set.
    ***> */
    SQL> create domain LATIN9_DOM char(8) character set ISOLATIN9;
    SQL> create domain KANJI_DOM char(5) character set KANJI;
    SQL> show domains;
    User domains in database with filename MIA_CHAR_SET
    KANJI_DOM                       CHAR(5)
             KANJI 5 Characters,  10 Octets
    LATIN9_DOM                      CHAR(8)
             ISOLATIN9 8 Characters,  8 Octets
    SQL>
Close Help