Macro Support for Dates - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

Validation of date strings in a macro takes place when it is performed. The format of date strings validate against a DATE column format or the default DATE format, both of which can change after creating the macro.

To guarantee that dates are properly validated, create or replace your macros by doing either or both of the following:

  • Specify dates as ANSI date literals instead of strings.

    ANSI date literals are accepted as dates for any date operation.

  • Specify the date format you want in a FORMAT phrase in the macro.