SQL/MX 2.x Reference Manual (H06.04+)

Introduction
HP NonStop SQL/MX Reference Manual540440-003
1-26
Delimiting Reserved Words in Guardian Names
statement with the associated Guardian physical name. DEFINE names can be
created within MXCI or can be inherited from the TACL process or the OSS shell.
For more information about DEFINEs, see DEFINEs on page 6-34.
Delimiting Reserved Words in Guardian Names
In NonStop SQL/MP, you can use reserved words in Guardian names that identify
tables, views, partitions, and collations. NonStop SQL/MX has many more reserved
words than NonStop SQL/MP. If an SQL/MX reserved word occurs as part of a
Guardian name, you must delimit it by enclosing it in double quotes—that is, it must be
a delimited identifier. See Using SQL/MX Reserved Words in SQL/MP Names on
page 6-53.
For example, suppose that the location of the OBJECTS table is \nsk.$system.SQL.
To determine the physical name associated with a given logical SQL/MX object name,
you can query the OBJECTS table:
SELECT guardian_name
FROM \nsk.$system."SQL".objects
WHERE logical_name = 'samdbcat.persnl.employee';
In this example, "SQL" is written as a delimited identifier because SQL is a reserved
word in NonStop SQL/MX.
Selecting or Changing Data
To select or change SQL/MP data that does not directly map to SQL/MX data types
and literals, you can use special extensions of NonStop SQL/MX with some
restrictions.
DATETIME Data
The SQL/MP DATETIME data type is specified:
DATETIME [start-field TO] end-field
The start-field and end-field specify a range of logically contiguous fields:
YEAR
MONTH
DAY
HOUR
MINUTE
SECOND
FRACTION [(precision)]
The start-field must precede the end-field. The FRACTION field can include
the precision option only if the FRACTION field is the end-field.