参考如下:
declare
t_cycle varchar2(10);
begin
with temp_t as(
SELECT 'aa' as t_a
FROM dual)
SELECT 'bb' || t.t_a as t_b
into t_cycle
FROM dual
left join temp_t t on 1 = 1;
dbms_output.put_line(t_cycle);
end;
WITH PARAMS AS (SELECT YearCycle-1 AS NF FROM DUAL)
SELECT TO_CHAR(TO_DATE(PM.NF || '-12-28','YYYY-MM-DD'),'IYYYIW')
into CycleFROM PARAMS PM
试试