MyException - 我的异常网
当前位置:我的异常网» HTML/CSS » HTML表格

HTML表格

www.MyException.Cn  网友分享于:2013-11-21  浏览:131次
HTML报表
#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 'OK' when 'ok' then 'OK' when ' ' then ' ' else 'NG' END)) )END))),
           WM_CONCAT(DECODE(QCGG04,'15',(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,'16',(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,'17',(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,'18',(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,'19',(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,'20',(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))) 
           FROM qci_file,qcgg_file,tc_qcj_file ",
       "  WHERE qcgg01 = '", g_argv3,"'", 
       "    AND qci01 = qcgg01 AND qci00='1' ",
       "    AND qci02 = tc_qcj02 AND qci02=qcgg02 ", 
       "    AND qci03 = qcgg03   AND qci03 ='",g_argv6,"'",
       "    AND qci041 = tc_qcj01 "
     CASE 
        WHEN g_argv5 ='1' LET l_sql01 = l_sql01 CLIPPED," AND qcgg02 LIKE 'B%' " 
        WHEN g_argv5 ='2' LET l_sql01 = l_sql01 CLIPPED," AND qcgg02 LIKE 'C%' " 
        OTHERWISE 
            LET l_sql01 = l_sql01 
     END CASE  	 
       LET l_sql01 = l_sql01 CLIPPED," GROUP BY qcgg02,tc_qcj031,tc_qcj03,tc_qcj032,tc_qcj04,tc_qcj05,tc_qcj051,tc_qcj052 "    
     
 LET l_sql02=" SELECT '[2]',qcgg02, tc_qcj031||tc_qcj03,tc_qcj04,tc_qcj032,TRIM(tc_qcj05) ,tc_qcj051,tc_qcj052,
           WM_CONCAT(DECODE(QCGG04,'1', (CASE INSTR(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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,'15',(CASE INSTR(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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,'16',(CASE INSTR(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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,'17',(CASE INSTR(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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,'18',(CASE INSTR(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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,'19',(CASE INSTR(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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,'20',(CASE INSTR(qcgg061,'.',1,1) WHEN 1 THEN '0'||qcgg061 ELSE to_char(NVL(to_char(qcgg061),(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)))   
          FROM qci_file,qcgg_file,tc_qcj_file",
       "  WHERE qcgg01 = '", g_argv3,"'", 
       "    AND qci01 = qcgg01 AND qci00='1' ",
       "    AND qci02 = tc_qcj02 AND qci02=qcgg02 ", 
       "    AND qci03 = qcgg03   AND qci03 ='",g_argv6,"'",
       "    AND qci041 = tc_qcj01 " 
     CASE 
        WHEN g_argv5 ='1' LET l_sql02 = l_sql02 CLIPPED," AND qcgg02 LIKE 'B%' " 
        WHEN g_argv5 ='2' LET l_sql02 = l_sql02 CLIPPED," AND qcgg02 LIKE 'C%' " 
        OTHERWISE 
            LET l_sql02 = l_sql02 
     END CASE  	 
       LET l_sql02 = l_sql02 CLIPPED," GROUP BY qcgg02,tc_qcj031,tc_qcj03,tc_qcj032,tc_qcj04,tc_qcj05,tc_qcj051,tc_qcj052 "    
 
 LET l_sql03 = " SELECT '[3]',qcgg02, tc_qcj031||tc_qcj03,tc_qcj04,tc_qcj032,TRIM(tc_qcj05) ,tc_qcj051,tc_qcj052,
           WM_CONCAT(DECODE(QCGG04,'1', (CASE INSTR(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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,'15',(CASE INSTR(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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,'16',(CASE INSTR(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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,'17',(CASE INSTR(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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,'18',(CASE INSTR(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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,'19',(CASE INSTR(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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,'20',(CASE INSTR(qcgg062,'.',1,1) WHEN 1 THEN '0'||qcgg062 ELSE to_char(NVL(to_char(qcgg062),(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)))   
           FROM qci_file,qcgg_file,tc_qcj_file", 
       "  WHERE qcgg01 = '", g_argv3,"'", 
       "    AND qci01 = qcgg01 AND qci00='1' ",
       "    AND qci02 = tc_qcj02 AND qci02=qcgg02 ", 
       "    AND qci03 = qcgg03   AND qci03 ='",g_argv6,"'",
       "    AND qci041 = tc_qcj01 " 
     CASE 
        WHEN g_argv5 ='1' LET l_sql03 = l_sql03 CLIPPED," AND qcgg02 LIKE 'B%' " 
        WHEN g_argv5 ='2' LET l_sql03 = l_sql03 CLIPPED," AND qcgg02 LIKE 'C%' " 
        OTHERWISE 
            LET l_sql03 = l_sql03
     END CASE  	 
       LET l_sql03 = l_sql03 CLIPPED," GROUP BY qcgg02,tc_qcj031,tc_qcj03,tc_qcj032,tc_qcj04,tc_qcj05,tc_qcj051,tc_qcj052 "    
 
###20121108 BY FMX 加入判断,不需要的不显示 
IF g_argv5 ='1' THEN
    SELECT NVL(SUM(qcgg06),0),NVL(SUM(qcgg061),0),NVL(SUM(qcgg062),0)
    INTO l_sum01,l_sum02,l_sum03
    FROM qcgg_file                                                                                                     
    WHERE qcgg01= g_argv3 AND qcgg02 LIKE 'B%'  AND qcgg03 = g_argv6 
    GROUP BY qcgg01,qcgg03
ELSE
    SELECT NVL(SUM(qcgg06),0),NVL(SUM(qcgg061),0),NVL(SUM(qcgg062),0)
    INTO l_sum01,l_sum02,l_sum03
    FROM qcgg_file                                                                                                     
    WHERE qcgg01= g_argv3 AND qcgg02 LIKE 'C%'  AND qcgg03 = g_argv6
    GROUP BY qcgg01,qcgg03
END IF 
    
  IF l_sum01 !=0 AND l_sum02 !=0 AND l_sum03 !=0 THEN
  	 LET l_sql = l_sql01 CLIPPED," UNION ",l_sql02 CLIPPED," UNION ",l_sql03 CLIPPED
  ELSE IF l_sum01 !=0 AND l_sum02 !=0 AND l_sum03 =0 THEN
  	 LET l_sql = l_sql01 CLIPPED," UNION ",l_sql02 CLIPPED
  ELSE 
     LET l_sql = l_sql01 CLIPPED  
 END IF
END IF 

 LET l_sql = l_sql CLIPPED," ORDER BY 2"

 PREPARE r4101_pre FROM l_sql 
       IF SQLCA.sqlcode != 0 THEN
        CALL cl_err('prepare:',SQLCA.sqlcode,1)
        EXIT PROGRAM
     END IF
  DECLARE r4101_cur CURSOR FOR r4101_pre
  FOREACH r4101_cur INTO sr.*
  .
  .
  .
  .
  .
  .


文章评论

老美怎么看待阿里赴美上市
老美怎么看待阿里赴美上市
10个调试和排错的小建议
10个调试和排错的小建议
不懂技术不要对懂技术的人说这很容易实现
不懂技术不要对懂技术的人说这很容易实现
什么才是优秀的用户界面设计
什么才是优秀的用户界面设计
Java程序员必看电影
Java程序员必看电影
为什么程序员都是夜猫子
为什么程序员都是夜猫子
每天工作4小时的程序员
每天工作4小时的程序员
总结2014中国互联网十大段子
总结2014中国互联网十大段子
一个程序员的时间管理
一个程序员的时间管理
我是如何打败拖延症的
我是如何打败拖延症的
程序员最害怕的5件事 你中招了吗?
程序员最害怕的5件事 你中招了吗?
亲爱的项目经理,我恨你
亲爱的项目经理,我恨你
程序员眼里IE浏览器是什么样的
程序员眼里IE浏览器是什么样的
代码女神横空出世
代码女神横空出世
60个开发者不容错过的免费资源库
60个开发者不容错过的免费资源库
科技史上最臭名昭著的13大罪犯
科技史上最臭名昭著的13大罪犯
漫画:程序员的工作
漫画:程序员的工作
我跳槽是因为他们的显示器更大
我跳槽是因为他们的显示器更大
程序员周末都喜欢做什么?
程序员周末都喜欢做什么?
十大编程算法助程序员走上高手之路
十大编程算法助程序员走上高手之路
为啥Android手机总会越用越慢?
为啥Android手机总会越用越慢?
旅行,写作,编程
旅行,写作,编程
那些争议最大的编程观点
那些争议最大的编程观点
写给自己也写给你 自己到底该何去何从
写给自己也写给你 自己到底该何去何从
如何区分一个程序员是“老手“还是“新手“?
如何区分一个程序员是“老手“还是“新手“?
5款最佳正则表达式编辑调试器
5款最佳正则表达式编辑调试器
编程语言是女人
编程语言是女人
程序员都该阅读的书
程序员都该阅读的书
做程序猿的老婆应该注意的一些事情
做程序猿的老婆应该注意的一些事情
程序猿的崛起——Growth Hacker
程序猿的崛起——Growth Hacker
 程序员的样子
程序员的样子
Web开发者需具备的8个好习惯
Web开发者需具备的8个好习惯
Web开发人员为什么越来越懒了?
Web开发人员为什么越来越懒了?
老程序员的下场
老程序员的下场
Java 与 .NET 的平台发展之争
Java 与 .NET 的平台发展之争
程序员应该关注的一些事儿
程序员应该关注的一些事儿
团队中“技术大拿”并非越多越好
团队中“技术大拿”并非越多越好
“肮脏的”IT工作排行榜
“肮脏的”IT工作排行榜
当下全球最炙手可热的八位少年创业者
当下全球最炙手可热的八位少年创业者
程序员必看的十大电影
程序员必看的十大电影
“懒”出效率是程序员的美德
“懒”出效率是程序员的美德
程序员和编码员之间的区别
程序员和编码员之间的区别
程序员的鄙视链
程序员的鄙视链
10个帮程序员减压放松的网站
10个帮程序员减压放松的网站
如何成为一名黑客
如何成为一名黑客
软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有