First, the demand background:
Table A:
CREATE TABLE T_SMCOMMONMSG (
FXH NUMBER,
FTYPE NUMBER,
FMSG_CONTENT VARCHAR2(1024 BYTE)
)
Table B:
CREATE TABLE T_SMYL_COMMONSND (
FXH NUMBER,
FMSG_CONTENT1 VARCHAR2(1024 BYTE),
FMSG_CONTENT2 VARCHAR2(1024 BYTE)
)
The original records in Table A are as follows:
FXH FTYPE FMSG_CONTENT
------ -------- --------------
98 0 msg1
99 0 msg2
100 0 msg3
101 0 msg4
The existing records in table B are as follows:
FXH FMSG_CONTENT1 FMSG_CONTENT2
------- ---------------- --------------
1 空 空
2 空 空
Requirements: You are now required to convert the records in table A to the records in Table B, in the following format:
FXH FMSG_CONTENT1 FMSG_CONTENT2
------ ---------------- --------------
1 msg1 msg2
2 msg3 msg4
Note: Table A is a table of information containing a variety of ftype types, where the ftype=0 information is the original information of the conversion, with the sequence number starting at 98
Table B is a table of information that contains a ftype type, and its ordinal number starts at 1