The SELECT T.a ccname,
Tc ertinum,
T.a ccnum,
T.a ccphone,
T.u intaccname,
T.U NITACCNUM,
T.d eputyname,
T.U NITPHONE,
T20 AJLXMC,
T21. AJSYMC,
U.U SERNAME,
D.ORG the NAME,
TO_CHAR (T.A CCEPTANCEDATE, '- dd yyyy - mm),
T.a cceptanceid,
(SELECT U.U SERNAME FROM ZF_USER U WHERE U.L OGINID=TAB. OPENOPERID) OPENOPERID,
CASE T2. REGISTER
WHEN '0' THEN
'no'
WHEN '1' THEN
'is'
The ELSE
'
END,
TO_CHAR (T2) ACCEPTANCEDATE, '- dd yyyy - mm),
TO_CHAR (T2) MODIDATE, '- dd yyyy - mm),
(SELECT flowstepname FROM zf102 WHERE flowid.=UV CURFLOW) flowstepname,
CASE T2. CASSTAT
WHEN '0' THEN
'didn't'
WHEN '1' THEN
In the 'file'
WHEN '2' THEN
'registered'
WHEN '3' THEN
'in the law enforcement'
WHEN '4' THEN
'law enforcement to complete'
The ELSE
'
END,
CASE T2. ASTAT
WHEN '0' THEN
'normal'
WHEN '1' THEN
'stop'
WHEN '2' THEN
'over'
WHEN '7' THEN
'undo'
WHEN '8' THEN
'return'
WHEN '9' THEN
'transferred'
The ELSE
'
END
The FROM ZF001 T,
ZF002 T2,
ZF_USER U,
ZF_DEPARTMENT D,
ZF008 UV,
ZF020 T20,
ZF021 T21,
ZF102 Z1,
(SELECT T.I SID, T3. ACCEPTANCEID T.O PENOPERID, U.U SERNAME
The FROM ZF010 T, ZF003 T3, ZF_USER U
WHERE T.I SID IN (SELECT MAX (T.I SID)
The FROM ZF010 T, ZF003 T3
WHERE T3. ISID=T.I SID
GROUP BY T3. ACCEPTANCEID)
AND T3. ISID=T.I SID
TAB AND T.O PENOPERID=U.L OGINID)
WHERE T.A CCEPTANCEID=T2. ACCEPTANCEID
AND TAB. ACCEPTANCEID=T.A CCEPTANCEID
AND UV. ACCEPTANCEID=T.A CCEPTANCEID
AND T.O PERID=U.L OGINID
AND the Z1. FLOWID=T2. FLOWID
AND T.a ccepttype=T20. AJLXID
AND T21. AJLXID=T20. AJLXID
AND T.R EASON=T21. AJSYID
AND DECODE (T2) OPERORGID, NULL, T.P RGID, T2. OPERORGID) ID=D.ORG
AND DECODE (T2) OPERORGID, NULL, T.P RGID, T2. OPERORGID)='1001'
AND UV. SENDTIME1 & gt;=TO_DATE (' 2018-01-01 ', '- DD YYYY - MM hh24: mi: ss')
AND UV. SENDTIME1 & lt;=TO_DATE (' 2019-01-01 ', '- DD YYYY - MM hh24: mi: ss') + 1
The SELECT T.a ccname,
Tc ertinum,
T.a ccnum,
T.a ccphone,
T.u intaccname,
T.U NITACCNUM,
T.d eputyname,
T.U NITPHONE,
T20 AJLXMC,
T21. AJSYMC,
U.U SERNAME,
D.ORG the NAME,
TO_CHAR (T.A CCEPTANCEDATE, '- dd yyyy - mm),
T.a cceptanceid,
(SELECT U.U SERNAME FROM ZF_USER U WHERE U.L OGINID=TAB. OPENOPERID) OPENOPERID,
CASE T2. REGISTER
WHEN '0' THEN
'no'
WHEN '1' THEN
'is'
The ELSE
'
END,
TO_CHAR (T2) ACCEPTANCEDATE, '- dd yyyy - mm),
TO_CHAR (T2) MODIDATE, '- dd yyyy - mm),
(SELECT flowstepname FROM zf102 WHERE flowid.=UV CURFLOW) flowstepname,
CASE T2. CASSTAT
WHEN '0' THEN
'didn't'
WHEN '1' THEN
In the 'file'
WHEN '2' THEN
'registered'
WHEN '3' THEN
'in the law enforcement'
WHEN '4' THEN
'law enforcement to complete'
The ELSE
'
END,
CASE T2. ASTAT
WHEN '0' THEN
'normal'
WHEN '1' THEN
'stop'
WHEN '2' THEN
'over'
WHEN '7' THEN
'undo'
WHEN '8' THEN
'return'
WHEN '9' THEN
'transferred'
The ELSE
'
END
The FROM ZF001 T,
ZF002 T2,
ZF_USER U,
ZF_DEPARTMENT D,
ZF008 UV,
ZF020 T20,
ZF021 T21,
ZF102 Z1,
(SELECT T.I SID, T3. ACCEPTANCEID T.O PENOPERID, U.U SERNAME
The FROM ZF010 T, ZF003 T3, ZF_USER U
WHERE T.I SID IN (SELECT MAX (T.I SID)
The FROM ZF010 T, ZF003 T3
WHERE T3. ISID=T.I SID
GROUP BY T3. ACCEPTANCEID)
AND T3. ISID=T.I SID
TAB AND T.O PENOPERID=U.L OGINID)
WHERE T.A CCEPTANCEID=T2. ACCEPTANCEID
AND TAB. ACCEPTANCEID=T.A CCEPTANCEID
AND UV. ACCEPTANCEID=T.A CCEPTANCEID
AND T.O PERID=U.L OGINID
AND the Z1. FLOWID=T2. FLOWID
AND T.a ccepttype=T20. AJLXID
AND T21. AJLXID=T20. AJLXID
AND T.R EASON=T21. AJSYID
AND DECODE (T2) OPERORGID, NULL, T.P RGID, T2. OPERORGID) ID=D.ORG
AND DECODE (T2) OPERORGID, NULL, T.P RGID, T2. OPERORGID)='1001'
AND UV. SENDTIME2 & gt;=TO_DATE (' 2018-01-01 ', '- DD YYYY - MM hh24: mi: ss')
AND UV. SENDTIME2 & lt;=TO_DATE (' 2019-01-01 ', '- DD YYYY - MM hh24: mi: ss') + 1
The SELECT T.a ccname,
Tc ertinum,
T.a ccnum,
T.a ccphone,
T.u intaccname,
T.U NITACCNUM,
T.d eputyname,
T.U NITPHONE,
T20 AJLXMC,
T21. AJSYMC,
U.U SERNAME,
D.ORG the NAME,
TO_CHAR (T.A CCEPTANCEDATE, '- dd yyyy - mm),
T.a cceptanceid,
(SELECT U.U SERNAME FROM ZF_USER U WHERE U.L OGINID=TAB. OPENOPERID) OPENOPERID,
CASE T2. REGISTER
WHEN '0' THEN
'no'
WHEN '1' THEN
'is'
The ELSE
'
END,
TO_CHAR (T2) ACCEPTANCEDATE, '- dd yyyy - mm),
TO_CHAR (T2) MODIDATE, '- dd yyyy - mm),
(SELECT flowstepname FROM zf102 WHERE flowid.=UV CURFLOW) flowstepname,
CASE T2. CASSTAT
WHEN '0' THEN
'didn't'
WHEN '1' THEN
In the 'file'
WHEN '2' THEN
'registered'
WHEN '3' THEN
'in the law enforcement'
WHEN '4' THEN
'law enforcement to complete'
The ELSE
'
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull