SET SESSION CALENDAR Examples | VantageCloud Lake - SET SESSION CALENDAR Examples - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

Example: Changing the Default Session Calendar Using SET SESSION CALENDAR

This example sets the default calendar for the session from Teradata to the system-defined calendar ISO.

SET SESSION CALENDAR=ISO;

This example sets the default calendar for the session from Teradata to the system-defined calendar COMPATIBLE.

SET SESSION CALENDAR=COMPATIBLE;

Example: Changing the Default Session Calendar Using CREATE USER

You can specify a different default session calendar for a user by specifying the SET SESSION CALENDAR SQL text string as the startup string for the user by submitting a CREATE USER or MODIFY USER statement.

Assuming that the default business calendar for the site is Teradata, the following CREATE USER statement creates a user named john_smith and uses the STARTUP string for john_smith to set his session calendar to COMPATIBLE instead of Teradata each time he starts a new session.

CREATE USER john_smith AS
PERM=10E6,
PASSWORD=john_smith,
SPOOL = 1200000,
FALLBACK PROTECTION,
STARTUP='SET SESSION CALENDAR=COMPATIBLE';