Supported scalar expressions – HP Neoview Release 2.4 Software User Manual
Page 42
Example:
EMP_ID = identity loader
Asks the loader to generate a key for target field EMP_ID.
scalar-expression
A simple expression composed of a fieldname_source, constant, and SQL functions
connected by simple arithmetic operators. This expression must be syntactically valid
for fitting into a corresponding SQL insert, update, or upsert statement. The maximum
length of a scalar-expression is 256 characters. This option is not supported for
extract operations and is not allowed on primary key columns.
Example 5-1 Supported Scalar Expressions
•
COL1 = expression ":COL1 * 5+2",
COL1 = expression "ASCII(current_user) + :COL1",
•
COL1 = expression "abs (:COL1)",
•
COL1 = expression "upper(:COL1)",
•
vchr1 = expression "dayname(current_date)",
•
COL1 = expression " date_part('second' , :COL1) ",
COL2 = expression "converttimestamp (juliantimestamp (:COL2) - 19)",
•
COL1 = expression "dateadd(day,3,:COL1)",
•
COL1 = expression "CAST (REPLACE(:COL1, ',','.') as NUMERIC(10,2)
•
COL2 = expression "interval '40' month + :COL2",
COL8 = expression "cast (:COL8 as interval hour to minute)",
•
COL1 = expression "cast(:COL1 || ' ' || dayname(current_date) as varchar(12)) ",
•
COL2 = expression "pi () + sin(:COL2)"
field-source-ref
For an extract operation, field-source-ref must be one of the following:
•
fieldname-source
(without the add or subtract option)
•
NULL
•
constant
field-mapping-options
A list of options.
condition = “true” | “false”
This option is only applicable for load operations where the operation type is update,
upsert, or delete. If condition is true, this field becomes part of the conditions in the
WHERE clause of the generated SQL statement.
This option must be set to false for an identity field mapping if the operation is update,
upsert, or delete. Otherwise, Transporter returns an error.
The default is “false” for non-key columns and “true” for key columns.
update = “true” | “false”
This option is only applicable for load operations where the operation type is update or
upsert. If update is true, this field becomes part of the UPDATE clause of the generated
SQL statement
This option cannot be set to “true” for primary key columns if the operation is upsert.
Transporter returns an error.
The default is “false” for key columns and “true” for non-key columns.
42
Control File Organization and Syntax