17.10 - Example SDF Files - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Database Utilities

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Publication ID
English (United States)

Example: Vantage default locale format settings

// File name     : tdlocaledef.txt   
// Purpose       : This file contains the specifications for data formatting(SDF) 
//                 defined by the user.      
// Scope         : Project - subsystems 
// Required files: None
// History       :  05-21-2001 - Created
//                  10-27-2005 - Added BIGINT
//                  05-24-2010 - Added TimeZoneString
// Description   : This data is compatible with pre-V2R5 releases. 
// DBS System Formatting Data 
// Day and month names
      ShortDays { 
      LongDays { 
      ShortMonths { 
      LongMonths { 
      AMPM { 
      // Parsing Elements
      RadixSeparator {"."}
      GroupSeparator {","}
      GroupingRule   {"3"}
      Currency       {"$"}
      ISOCurrency    {"USD"}
      CurrencyName    {"US Dollars"}
      CurrencyRadixSeparator {"."}
      CurrencyGroupSeparator {","}
      CurrencyGroupingRule   {"3"}
      DualCurrency    {"$"}
      DualISOCurrency {"USD"}
      DualCurrencyName {"US Dollars"}
      // Data type default formats
      BYTEINT        {"-(3)9"}
      INTEGER        {"-(10)9"}
      SMALLINT       {"-(5)9"}
      BIGINT         {"-(19)9"}
      NUMERIC        {"--(I).9(F)"}
      REAL           {"-9.99999999999999E-999"}
      DATE           {"YY/MM/DD"}
      TIME           {"HH:MI:SS.S(F)Z"}
      NUMBER         {"FN9"}
      // System Time Zone string
      TimeZoneString {""}

Example: Customized SDF for Japanese Data Formatting

This example shows how an SDF file might be customized for a Japanese location. The file contains Japanese date and time default formatting and the Unicode hex notation for Kanji characters. Also, Unicode characters in the default format strings are specified with “\u.”

// DBS System Formatting Data
// Day and month names
      ShortDays {
      LongDays {
      ShortMonths {
      LongMonths {
      AMPM {
      // Parsing Elements
      RadixSeparator         {"."}
      GroupSeparator         {","}
      GroupingRule           {"3"}
      Currency               {"\u00A5"}
      ISOCurrency            {"JPY"}
      CurrencyName           {"Yen"}
      CurrencyRadixSeparator {"."}
      CurrencyGroupSeparator {","}
      CurrencyGroupingRule   {"3"}
      DualCurrency           {"\u00A5"}
      DualISOCurrency        {"JPY"}
      DualCurrencyName       {"Yen"}
      // Data type default formats
      BYTEINT        {"-(3)9"}
      INTEGER        {"G-(I)9"}
      SMALLINT       {"G-(I)9"}
      BIGINT         {"G-(I)9"}
      NUMERIC        {"G--(I)D9(F)"}
      REAL           {"G-9D99999999999999E-999"}
      DATE           {"YYYY\u5E74MM\u6708DD\u65E5"}
      TIME           {"HH\u6642MI\u5206SSDS(F)\u79D2Z"}
      TIMESTAMP      {"YYYY\u5E74MM\u6708DD\u65E5BHH\u6642MI\u5206SSDS(F)\u79D2Z"}      NUMBER         {"FN9"}
      // System Time Zone string
      TimeZoneString {""}