호출 CALL PKG_CALC.PRC_ST300('201512','CODE1','ID')
===============================
PROCEDURE PRC_ST300(V_COM_YM IN VARCHAR2,V_CODE IN VARCHAR2, V_EMP_CD IN VARCHAR2 DEFAULT 'ID') IS
BEGIN
FOR COM_RULES IN ( SELECT M.COM_CD
, M.CALC_STEP
, M.INSCO_CD
, S1_BCOLS
, R.SRC_COMS_SUIP_AMT_SELECT
, R.SRC_COMS_JIGUB_AMT_SELECT
, R.SRC_ACOMS_SELECT
, R.SRC_BCOMS_SELECT
, R.SRC_BCOMS_WHERE
FROM TABLE ....
====================================
vSQL := 'INSERT '
||CHR(10)||' INTO AAA ('
||CHR(10)||' ) '
||CHR(10)||'SELECT *'
||CHR(10)||' FROM ( '
||CHR(10)||' SELECT
||CHR(10)||' , (' ||COM_RULES.SRC_COMS_SUIP_AMT_SELECT ||') * ((NVL(SU.SUIP_RATE,100)/100) * (NVL(SU.SUIP_GG_RATE,100) /100) ) AS SUIP_AMT'
||CHR(10)||' , (' ||COM_RULES.SRC_COMS_JIGUB_AMT_SELECT ||') * ((NVL(SU.JIGUB_RATE,100)/100) * (NVL(SU.JIGUB_GG_RATE,100)/100) ) AS JIGUB_AMT'