R
rqj
Unregistered / Unconfirmed
GUEST, unregistred user!
SELECT ROWNUM RN, IT.*
FROM (SELECT IT.ID,
DECODE(IT.OPERTYPE,
1,
IT.OBJECTID1,
DECODE(IT.OBJECTTABLENAME1,
'EQUIPMENT',
(SELECT CODE
FROM EQUIPMENT EQ
WHERE EQ.ID = IT.OBJECTID1),
'PORT',
(SELECT CODE FROM PORT P WHERE P.ID = IT.OBJECTID1),
'MODULE',
(SELECT CODE
FROM MODULE M
WHERE M.ID = IT.OBJECTID1),
'SDHUNITE',
(SELECT CODE
FROM SDHUNITE SU
WHERE SU.ID = IT.OBJECTID1),
'SDHCHANNEL',
(SELECT CODE
FROM SDHCHANNEL SC
WHERE SC.ID = IT.OBJECTID1),
'CIRCUIT',
(SELECT CODE
FROM CIRCUIT C
WHERE C.ID = IT.OBJECTID1),
'LOOP',
(SELECT CODE FROM LOOP L WHERE L.ID = IT.OBJECTID1),
'EQSLOT',
(SELECT CODE
FROM EQSLOT ES
WHERE ES.ID = IT.OBJECTID1),
'ANTENNA',
(SELECT CODE
FROM ANTENNA A
WHERE A.ID = IT.OBJECTID1),
IT.OBJECTID1)) AS OBJECTID1,
(SELECT CHNAME
FROM INFDICTM
WHERE ENNAME = IT.OBJECTTABLENAME1) || '--' ||
DECODE((SELECT TYPECODE
FROM INFDICTM
WHERE ENNAME = IT.OBJECTTABLENAME1),
0,
'生产',
1,
'中间',
2,
'外部') AS OBJECTTABLENAME1,
DECODE(IT.OPERTYPE,
2,
DECODE(IT.OBJECTTABLENAME2,
'EQUIPMENT',
(SELECT CODE
FROM EQUIPMENT EQ
WHERE EQ.ID = IT.OBJECTID2),
'PORT',
(SELECT CODE FROM PORT P WHERE P.ID = IT.OBJECTID2),
'MODULE',
(SELECT CODE
FROM MODULE M
WHERE M.ID = IT.OBJECTID2),
'SDHUNITE',
(SELECT CODE
FROM SDHUNITE SU
WHERE SU.ID = IT.OBJECTID2),
'SDHCHANNEL',
(SELECT CODE
FROM SDHCHANNEL SC
WHERE SC.ID = IT.OBJECTID2),
'CIRCUIT',
(SELECT CODE
FROM CIRCUIT C
WHERE C.ID = IT.OBJECTID2),
'LOOP',
(SELECT CODE FROM LOOP L WHERE L.ID = IT.OBJECTID2),
'ANTENNA',
(SELECT CODE
FROM ANTENNA A
WHERE A.ID = IT.OBJECTID2),
'OUTERADM',
(SELECT DISTINCT CODE
FROM OUTERADM A
WHERE A.ID = IT.OBJECTID2),
'OUTERSHELF',
(SELECT DISTINCT CODE
FROM OUTERADM A
WHERE A.ID =
SUBSTR(IT.OBJECTID2,
0,
INSTR(IT.OBJECTID2, '|') - 1)) ||
SUBSTR(IT.OBJECTID2,
INSTR(IT.OBJECTID2, '|'),
LENGTH(IT.OBJECTID2)),
'OUTERSLOT',
(SELECT DISTINCT CODE
FROM OUTERADM A
WHERE A.ID =
SUBSTR(IT.OBJECTID2,
0,
INSTR(IT.OBJECTID2, '|') - 1)) ||
SUBSTR(IT.OBJECTID2,
INSTR(IT.OBJECTID2, '|'),
LENGTH(IT.OBJECTID2)),
'OUTERPORT',
(SELECT DISTINCT CODE
FROM OUTERADM A
WHERE A.ID =
SUBSTR(IT.OBJECTID2,
0,
INSTR(IT.OBJECTID2, '|') - 1)) ||
SUBSTR(IT.OBJECTID2,
INSTR(IT.OBJECTID2, '|'),
LENGTH(IT.OBJECTID2)),
'OUTERPANNEL',
(SELECT DISTINCT CODE
FROM OUTERADM A
WHERE A.ID =
SUBSTR(IT.OBJECTID2,
0,
INSTR(IT.OBJECTID2, '|') - 1)) ||
SUBSTR(IT.OBJECTID2,
INSTR(IT.OBJECTID2, '|'),
LENGTH(IT.OBJECTID2)),
IT.OBJECTID2)) AS OBJECTID2,
(SELECT CHNAME
FROM INFDICTM
WHERE ENNAME = IT.OBJECTTABLENAME2) || '--' ||
DECODE((SELECT TYPECODE
FROM INFDICTM
WHERE ENNAME = IT.OBJECTTABLENAME2),
0,
'生产',
1,
'中间',
2,
'外部') AS OBJECTTABLENAME2,
IT.OPERUSER,
DECODE(IT.OPERKIND,
0,
'中间表与厂商',
1,
'中间表与TP生产表',
2,
'TP生产表与厂商') AS OPERKIND,
DECODE(IT.OPERTYPE, 0, '增加', 1, '删除', 2, '修改') AS OPERTYPE,
DECODE(IT.ISSUCCEED, 0, '不成功', 1, '成功') AS ISSUCCEED,
IT.BEGINDATETIME,
IT.ENDDATETIME,
IT.OPERDESC,
DECODE(IT.OBJECTTABLENAME2,
'OUTERMS',
NVL((SELECT DISTINCT NAME
FROM OUTERMS A
WHERE A.ID = IT.OBJECTID2),
IT.OBJECTID2),
'SDHUNITE',
NVL((SELECT DISTINCT NAME
FROM SDHUNITE SU
WHERE SU.ID = IT.OBJECTID2),
IT.OBJECTID2),
'') AS OUTERMSNAME
FROM INFINTERFACELOG IT
WHERE REQUESTID = '1003134673'
and 1 = 1) IT
FROM (SELECT IT.ID,
DECODE(IT.OPERTYPE,
1,
IT.OBJECTID1,
DECODE(IT.OBJECTTABLENAME1,
'EQUIPMENT',
(SELECT CODE
FROM EQUIPMENT EQ
WHERE EQ.ID = IT.OBJECTID1),
'PORT',
(SELECT CODE FROM PORT P WHERE P.ID = IT.OBJECTID1),
'MODULE',
(SELECT CODE
FROM MODULE M
WHERE M.ID = IT.OBJECTID1),
'SDHUNITE',
(SELECT CODE
FROM SDHUNITE SU
WHERE SU.ID = IT.OBJECTID1),
'SDHCHANNEL',
(SELECT CODE
FROM SDHCHANNEL SC
WHERE SC.ID = IT.OBJECTID1),
'CIRCUIT',
(SELECT CODE
FROM CIRCUIT C
WHERE C.ID = IT.OBJECTID1),
'LOOP',
(SELECT CODE FROM LOOP L WHERE L.ID = IT.OBJECTID1),
'EQSLOT',
(SELECT CODE
FROM EQSLOT ES
WHERE ES.ID = IT.OBJECTID1),
'ANTENNA',
(SELECT CODE
FROM ANTENNA A
WHERE A.ID = IT.OBJECTID1),
IT.OBJECTID1)) AS OBJECTID1,
(SELECT CHNAME
FROM INFDICTM
WHERE ENNAME = IT.OBJECTTABLENAME1) || '--' ||
DECODE((SELECT TYPECODE
FROM INFDICTM
WHERE ENNAME = IT.OBJECTTABLENAME1),
0,
'生产',
1,
'中间',
2,
'外部') AS OBJECTTABLENAME1,
DECODE(IT.OPERTYPE,
2,
DECODE(IT.OBJECTTABLENAME2,
'EQUIPMENT',
(SELECT CODE
FROM EQUIPMENT EQ
WHERE EQ.ID = IT.OBJECTID2),
'PORT',
(SELECT CODE FROM PORT P WHERE P.ID = IT.OBJECTID2),
'MODULE',
(SELECT CODE
FROM MODULE M
WHERE M.ID = IT.OBJECTID2),
'SDHUNITE',
(SELECT CODE
FROM SDHUNITE SU
WHERE SU.ID = IT.OBJECTID2),
'SDHCHANNEL',
(SELECT CODE
FROM SDHCHANNEL SC
WHERE SC.ID = IT.OBJECTID2),
'CIRCUIT',
(SELECT CODE
FROM CIRCUIT C
WHERE C.ID = IT.OBJECTID2),
'LOOP',
(SELECT CODE FROM LOOP L WHERE L.ID = IT.OBJECTID2),
'ANTENNA',
(SELECT CODE
FROM ANTENNA A
WHERE A.ID = IT.OBJECTID2),
'OUTERADM',
(SELECT DISTINCT CODE
FROM OUTERADM A
WHERE A.ID = IT.OBJECTID2),
'OUTERSHELF',
(SELECT DISTINCT CODE
FROM OUTERADM A
WHERE A.ID =
SUBSTR(IT.OBJECTID2,
0,
INSTR(IT.OBJECTID2, '|') - 1)) ||
SUBSTR(IT.OBJECTID2,
INSTR(IT.OBJECTID2, '|'),
LENGTH(IT.OBJECTID2)),
'OUTERSLOT',
(SELECT DISTINCT CODE
FROM OUTERADM A
WHERE A.ID =
SUBSTR(IT.OBJECTID2,
0,
INSTR(IT.OBJECTID2, '|') - 1)) ||
SUBSTR(IT.OBJECTID2,
INSTR(IT.OBJECTID2, '|'),
LENGTH(IT.OBJECTID2)),
'OUTERPORT',
(SELECT DISTINCT CODE
FROM OUTERADM A
WHERE A.ID =
SUBSTR(IT.OBJECTID2,
0,
INSTR(IT.OBJECTID2, '|') - 1)) ||
SUBSTR(IT.OBJECTID2,
INSTR(IT.OBJECTID2, '|'),
LENGTH(IT.OBJECTID2)),
'OUTERPANNEL',
(SELECT DISTINCT CODE
FROM OUTERADM A
WHERE A.ID =
SUBSTR(IT.OBJECTID2,
0,
INSTR(IT.OBJECTID2, '|') - 1)) ||
SUBSTR(IT.OBJECTID2,
INSTR(IT.OBJECTID2, '|'),
LENGTH(IT.OBJECTID2)),
IT.OBJECTID2)) AS OBJECTID2,
(SELECT CHNAME
FROM INFDICTM
WHERE ENNAME = IT.OBJECTTABLENAME2) || '--' ||
DECODE((SELECT TYPECODE
FROM INFDICTM
WHERE ENNAME = IT.OBJECTTABLENAME2),
0,
'生产',
1,
'中间',
2,
'外部') AS OBJECTTABLENAME2,
IT.OPERUSER,
DECODE(IT.OPERKIND,
0,
'中间表与厂商',
1,
'中间表与TP生产表',
2,
'TP生产表与厂商') AS OPERKIND,
DECODE(IT.OPERTYPE, 0, '增加', 1, '删除', 2, '修改') AS OPERTYPE,
DECODE(IT.ISSUCCEED, 0, '不成功', 1, '成功') AS ISSUCCEED,
IT.BEGINDATETIME,
IT.ENDDATETIME,
IT.OPERDESC,
DECODE(IT.OBJECTTABLENAME2,
'OUTERMS',
NVL((SELECT DISTINCT NAME
FROM OUTERMS A
WHERE A.ID = IT.OBJECTID2),
IT.OBJECTID2),
'SDHUNITE',
NVL((SELECT DISTINCT NAME
FROM SDHUNITE SU
WHERE SU.ID = IT.OBJECTID2),
IT.OBJECTID2),
'') AS OUTERMSNAME
FROM INFINTERFACELOG IT
WHERE REQUESTID = '1003134673'
and 1 = 1) IT