AT TIME ZONE Option for Java External Procedures | Teradata Vantage - AT TIME ZONE Option for External Procedures - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantage™

When you create an external procedure, the database stores the current session time zone for the procedure along with its definition to enable the SQL language elements in the procedure to execute in a consistent time zone and produce consistent results. However, time or timestamp data passed as an input parameter to the procedure still use the runtime session time zone rather than the creation time zone for the procedure.

The AT TIME ZONE option of the ALTER PROCEDURE statement enables you to reset the time zone for all of the SQL elements of external procedures when you recompile a procedure. The database then stores the newly specified time zone as the creation time zone for the procedure.

You can only specify AT TIME ZONE with the COMPILE option, and it must follow the COMPILE specification. If it does not, the database aborts the request and returns an error to the requestor. For details, see the information about ALTER PROCEDURE (External Form) in Teradata Vantage™ - SQL Data Definition Language Detailed Topics, B035-1184.