DATABASE XXXX;
CREATE MULTISET TABLE TEST123 ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
COMMON_KEY VARCHAR(20),
PARENT VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC,
CHILD VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC,
LVL VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC
)
PRIMARY INDEX INUP00_CATEGY_FUNC ( PARENT, CHILD );
INSERT INTO TEST123
('WS', NULL, 0,'RRT');
INSERT INTO TEST123
('WS', 'WG1', 1,'RRT');
INSERT INTO TEST123
('WS','WG2', 1,'RRT');
INSERT INTO TEST123
('WS', 'WA', 1,'RRT');
INSERT INTO TEST123
('WG1', 'W1', 2,'RRT');
INSERT INTO TEST123
('WG1', 'B1', 2,'RRT');
INSERT INTO TEST123
('WG2', 'W2', 2,'RRT');
INSERT INTO TEST123
('WG2', 'B2', 2,'RRT');
Parent Child Level Common_Key
===== ===== ===== =========
WS NULL L0 RRT
WS WG1 L1 RRT
WS WG2 L1 RRT
WS WA L1 RRT
WG1 W1 L2 RRT
WG1 B1 L2 RRT
WG2 W2 L2 RRT
WG2 B2 L2 RRT
Desired Output
==============
WS WG1 WG2 WA W1 B1 W2 B2
↧