Have the following table
CREATE TABLE mytable (
PK1 NUMBER,
PK2 NUMBER,
ARRAY NUMBER,
DESCRIPTION VARCHAR2(20)
);
ALTER TABLE mytable ADD(
PRIMARY KEY (PK1,PK2)
);
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (1,1,3,'DESC_3');
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (1,1,4,'DESC_4');
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (1,2,2,'DESC_2');
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (2,1,1,'DESC_1');
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (2,1,3,'DESC_3');
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (2,2,3,'DESC_3');
Would like to have to following strings:
for PK1=1,PK2=1 : v_result := <TAG></TAG><TAG></TAG><TAG>DESC_3</TAG><TAG>DESC_4</TAG>;
for PK1=1,PK2=2 : v_result := <TAG></TAG><TAG>DESC_2</TAG><TAG></TAG><TAG></TAG>;
for PK1=2,PK2=1 : v_result := <TAG>DESC_1</TAG><TAG></TAG><TAG>DESC_3</TAG><TAG></TAG>;
for PK1=2,PK2=2 : v_result := <TAG></TAG><TAG></TAG><TAG>DESC_3</TAG><TAG></TAG>;
CREATE TABLE mytable (
PK1 NUMBER,
PK2 NUMBER,
ARRAY NUMBER,
DESCRIPTION VARCHAR2(20)
);
ALTER TABLE mytable ADD(
PRIMARY KEY (PK1,PK2)
);
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (1,1,3,'DESC_3');
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (1,1,4,'DESC_4');
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (1,2,2,'DESC_2');
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (2,1,1,'DESC_1');
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (2,1,3,'DESC_3');
INSERT INTO mytable(PK1,PK2,ARRAY,DESCRIPTION)
VALUES (2,2,3,'DESC_3');
Would like to have to following strings:
for PK1=1,PK2=1 : v_result := <TAG></TAG><TAG></TAG><TAG>DESC_3</TAG><TAG>DESC_4</TAG>;
for PK1=1,PK2=2 : v_result := <TAG></TAG><TAG>DESC_2</TAG><TAG></TAG><TAG></TAG>;
for PK1=2,PK2=1 : v_result := <TAG>DESC_1</TAG><TAG></TAG><TAG>DESC_3</TAG><TAG></TAG>;
for PK1=2,PK2=2 : v_result := <TAG></TAG><TAG></TAG><TAG>DESC_3</TAG><TAG></TAG>;