Select * from (
Select
Case
When Amy polumbo ROCESS_ID in (' 101291 ', '101508') then a.c ustomer_sn
When Amy polumbo ROCESS_ID in (' 101509 ', '101510') then a.s erial_number
End as SN,
Case
When Amy polumbo ROCESS_ID in (' 101291 ', '101508') then b. w_version_b
When Amy polumbo ROCESS_ID='101509' then b. w_version_l
When Amy polumbo ROCESS_ID='101510' then b. w_version_r
End the as FW
The from aa partition (P_C_202003) a
Left the join bb partition (P_A_202003) on b
(case
When Amy polumbo ROCESS_ID in (' 101291 ', '101508') then a.c ustomer_sn
When Amy polumbo ROCESS_ID in (' 101509 ', '101510') then a.s erial_number
End)=b.s n
And (case
When Amy polumbo ROCESS_ID in (' 101291 ', '101508') then b. w_version_b
When Amy polumbo ROCESS_ID='101509' then b. w_version_l
When Amy polumbo ROCESS_ID='101510' then b. w_version_r
End) is not null
Where a.c urrent_status=0
And Amy polumbo rocess_id in (' 101291 ', '101509', '101510', '101508')
And a.o ut_process_time between to_date (' 11:00:00 2020-03-23 ', '- dd yyyy - mm hh24: mi: ss')
And to_date (' 19:00:00 2020-03-23 ', '- dd yyyy - mm hh24: mi: ss')
)
Where FW is null;
SQL is the SQL above, do you have any questions don't have to scrutinize the SQL logic () should be no problem what problem, problem is that if you remove the last line where FW is null data can query, add the where FW is null will be submitted to the ORA - 03113: the end - of - the file on the communication channel
CodePudding user response:
If there is other error message alert log