NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-35
Examples—Collation Definitions
This requirement exists because Pathmaker generates SQL queries in the following
format:
SELECT x FROM t WHERE col1 >= :h1
AND col1 <= :h2
where :h1 is a value entered from a screen, and :h2 is the same value padded with
binary 1s.
Such a query depends on binary 1 having the maximum character value (that is,
having the integer value 255 and being positioned last in the order list). An SQL
collation supports this usage only if hexadecimal ff is the final character in the order
list.
Examples—Collation Definitions
The following example shows an order list from an LC_COLLATE section that
includes a German a-umlaut and preserves the relative positions of <a> and <e> in
the order of the character collation sequence:
LC_COLLATE
order_start forward
<a>
... ...
<e>
... ...
<z>
\d196 "<a><e>"
order_end
END LC_COLLATE
The following example demonstrates the use of ellipsis and the effect of specifying
weight for elements in the order list of an LC_COLLATE section.
The ellipsis in the column on the left specifies all of the characters between the
letters B and Z (that is, C through Y). The ellipsis in the column on the right
specifies that all of the characters between the letters B and Z collate according to
their relative positions in the collating sequence. The letter b collates the same as
itself, even though the weight symbol is omitted.
LC_COLLATE
order_start forward
A A
B B
... ...
Z Z
a A
b
order_end
END LC_COLLATE
The following example also demonstrates the use of ellipsis and weight in an
order list of an LC_COLLATE section, but uses them differently than the previous
example.