Specifying Source File Locations - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

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
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

The CREATE FUNCTION statement provides clauses that specify the name and path of the function source code.

CREATE FUNCTION Clause Description
EXTERNAL Use the EXTERNAL clause when the function source is in the current or default directory on the client, and no other files need to be included.

If the CREATE FUNCTION includes the SPECIFIC clause, then the source name is the same as the specific name; otherwise, the source name is the name that immediately follows the CREATE FUNCTION keywords.

If the client is...

  • workstation-attached, then BTEQ adds appropriate file extensions to the source name to locate the source file.
  • mainframe-attached, then the source name must be a DDNAME file name.
EXTERNAL NAME function_name Use the EXTERNAL function_name clause when the function source is in the current or default directory on the client, and no other files need to be included.

The source name is the same as function_name.

If the client is...

  • workstation-attached, then BTEQ adds appropriate file extensions to function_name to locate the source file.
  • mainframe-attached, then function_name must be a DDNAME file name.
EXTERNAL NAME 'string'
Use ' string ' to specify names and locations of the following:
  • Function source, include header files, object files, libraries, and packages on the server.
  • Function source, include header files, and object files on the client.

You can also use 'string' to specify that the source or include files not be stored.

If the client is...

  • workstation-attached, then if necessary, BTEQ adds appropriate file extensions to the names to locate the files.
  • mainframe-attached, then the names must be DDNAME file names.