日期:2014-05-17 浏览次数:20654 次
#20121108 BY FMX LET l_sql01 = " SELECT '[1]',qcgg02, tc_qcj031||tc_qcj03,tc_qcj04,tc_qcj032,TRIM(tc_qcj05) ,tc_qcj051,tc_qcj052, WM_CONCAT(DECODE(QCGG04,'1', (CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'2', (CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'3', (CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'4', (CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'5', (CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'6', (CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'7', (CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'8', (CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'9', (CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'10',(CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'11',(CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'12',(CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'13',(CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))), WM_CONCAT(DECODE(QCGG04,'14',(CASE INSTR(qcgg06,'.',1,1) WHEN 1 THEN '0'||qcgg06 ELSE to_char(NVL(to_char(qcgg06),(case (NVL(qcgg07,' ')) when 'e0000' then 'OK' when 'E0000' then 'OK' when 'OK' then