文件名称:根据时间拆分记录的方法
文件大小:357B
文件格式:TXT
更新时间:2016-04-02 03:54:28
拆分数据
WITH t2 AS (SELECT ROWNUM-1 rn FROM dual CONNECT BY ROWNUM<=(SELECT MAX( ceil(months_between(e_date,s_date)))+1 FROM URP_WAGE.T_WAGE_BASE_ITEM_BKYM)) SELECT employee_id,year_month, Add_months(s_date,rn) FROM URP_WAGE.T_WAGE_BASE_ITEM_BKYM,t2 WHERE Add_months(s_date,rn)<=e_date ORDER BY employee_id,year_month,rn ;