Neoview SQL Reference Manual (R2.3)
(EXPR)
--------------------
2
2
2
--- 3 row(s) selected.
• This query shows how multiple TRANSPOSE clauses can be used in the same query. The
result table from this query has nine times as many rows as there are rows in MYTABLE:
SELECT KEYCOL1, VALCOL1, KEYCOL2, VALCOL2 FROM mytable
TRANSPOSE A, B, C AS VALCOL1
KEY BY KEYCOL1
TRANSPOSE D, E, F AS VALCOL2
KEY BY KEYCOL2;
The result table of the TRANSPOSE query is:
VALCOL2KEYCOL2VALCOL1KEYCOL1
d1111
e1211
f1311
d11102
e12102
f13102
d111003
e121003
f131003
d2121
e2221
f2321
d21202
e22202
f23202
d212003
e222003
f232003
• This query shows how a TRANSPOSE clause can contain multiple transpose sets—that is,
multiple transpose-item-list AS transpose-col-list. The expressions A, B, and
C are of type integer, and expressions D, E, and F are of type character.
SELECT KEYCOL, VALCOL1, VALCOL2 FROM mytable
TRANSPOSE A, B, C AS VALCOL1
D, E, F AS VALCOL2
KEY BY KEYCOL;
TRANSPOSE Clause 285