HP Neoview Release 2.3 Software User Manual
Page 35
fieldname
The name you select for the field of the format. If the format is SQL table, the fieldname
must be one of the column names of the associated SQL table or query. Otherwise, the
fieldname
must be unique within this record format.
When a Neoview SQL table format is used for an extract operation, the following rules
and considerations apply:
•
For table sources, fieldname must be one of the column names of the associated
table.
•
For Neoview SQL sources (where the extract source is a database query):
— fieldname must be one of the 1-part column names of the associated query.
That is, fieldname must be a simple column name only without any table
qualifier. For example, for a column named ADDRESS from a table named
EMPLOYEES
:
fieldname
must have the value: ADDRESS
fieldname
cannot have the value: EMPLOYEES.ADDRESS
•
If multiple columns of the query have names matching fieldname, the
field-definitions
is assumed to refer only to the first column position where
a matching name is found. Subsequent columns with the matching name are not
accessible within this dataformat.
There are two workarounds for this problem:
— Derived columns of the query, for example, the results of Neoview SQL
expressions and aggregate functions, by default are identified by the name
“(EXPR)”. If multiple derived columns are produced by a single query, use an
AS
clause in the query text to associate a name with each derived column. For
example:
SELECT max(a) as MAX_A, min(a) as MIN_A
FROM myTable
— If multiple table columns produced by the query have the same 1-part column
name, use an AS clause in the query text to associate unique names with those
columns. For example, if tables T1 and T2 both have columns named A and B:
SELECT T1.B as T1_B, T2.B as T2_B
FROM T1, T2
WHERE T1.A = T2.A
For SQL table format, if fieldname is not double-quoted, it is interpreted as an HP
Neoview SQL regular identifier. If fieldname is double-quoted, it is interpreted as an
HP Neoview SQL delimited identifier.
Delimited identifiers differ from regular identifiers in many ways, including:
•
Delimited identifiers are case-sensitive.
•
Spaces within a delimited identifier are significant except for trailing spaces.
•
You can use reserved words as delimited identifiers.
See the HP Neoview SQL Reference Manual for details on SQL identifiers.
datatype
can be one of the supported data listed in
“Supported Data Types” (page 45)
For Neoview SQL table formats, datatype must be one of:
•
the data type of the associated table or query column
•
varchar
Control File Organization and Syntax
35