But reduce the SQL statements can be compiled successfully, on the other computer compilation will not quote the wrong, is this why?
Check the baidu and CSDN no similar mistake, please you encountered this error predecessors to give directions,
//the first part of the main dataThe SQL_Query=@ "SELECT DISTINCT
SUBCON_ID,
P_OPER,
CXMT_LOT_ID,
PRODUCT_ID,
LOT_ID,
HIST_SEQ,
(CASE
The WHEN SUBSTR (PRODUCT_ID, 1, 2)='DB' THEN 'FBGA'
The WHEN SUBSTR (PRODUCT_ID, 1, 2)='DQ' THEN 'WBGA'
The ELSE '
END)
AS PROD_TYPE,
WO_NO,
OPERATION_NO,
STEP_NAME,
WEEK,
SUBSTR (SLT_END_TIME, 0, 10)
AS TEST_DATE,
NVL (S_TIME_ST S_TIME_SP) | | '00'
AS SLT_START_TIME,
SLT_END_TIME | | '00'
AS SLT_END_TIME,
TEST_TYPE,
(SELECT TEST_TEMP
The FROM MWIPTSTPGM
WHERE OPER=P_OLD_OPER
AND MAT_ID=P_MAT_ID
AND RELEASE_FLAG='Y'
AND TEST_PGM_VER=P_TEST_PGM_VER
AND TEST_PGM_NAME=P_TEST_PGM_NAME)
AS TEST_TEMP,
DECODE (TRIM (P_TEST_PGM_NAME | | P_TEST_PGM_VER),
NULL, ",
TRIM (P_TEST_PGM_NAME | | '_' | | P_TEST_PGM_VER))
AS the PROGRAM,
NVL (
(SELECT TEST_TIME
The FROM MWIPTSTPGM
WHERE OPER=P_OLD_OPER
AND MAT_ID=P_MAT_ID
AND RELEASE_FLAG='Y'
AND TEST_PGM_VER=P_TEST_PGM_VER
AND TEST_PGM_NAME=P_TEST_PGM_NAME),
0)
AS TEST_TIME,
EQP_ID,
QTY,
END_CUST,
LOT_TYPE,
DECODE (TRIM (F_TEST_PGM_NAME | | F_TEST_PGM_VER),
NULL, ",
TRIM (F_TEST_PGM_NAME | | '_' | | F_TEST_PGM_VER))
AS FT_TEST_PGM
The FROM (SELECT DISTINCT
'HFTF'
AS SUBCON_ID,
Ihs. OLD_OPER
AS P_OPER,
Ihs. MAT_ID
AS P_MAT_ID,
Ihs. OLD_OPER
AS P_OLD_OPER,
ELT. CUST_LOT_ID
AS CXMT_LOT_ID,
Ihs. LOT_CMF_5
AS PRODUCT_ID,
Ihs. LOT_ID
AS LOT_ID,
Ihs. HIST_SEQ
AS HIST_SEQ,
(SELECT WO_NUMBER
The FROM EDI_812_EWO
WHERE WO_NUMBER=ELT. CUST_DATA_2
AND SHIP_LOT_ID=ELT. CUST_DATA_1)
AS WO_NO,
(SELECT KEY_5
The FROM MGCMTBLDAT
WHERE TABLE_NAME='OPER_TEST AND KEY_6.=HIS OLD_OPER)
AS OPERATION_NO,
(SELECT KEY_3
The FROM MGCMTBLDAT
WHERE TABLE_NAME='OPER_TEST AND KEY_6.=HIS OLD_OPER)
AS STEP_NAME,
ELT. WORK_WEEK
AS WEEK,
(SELECT TO_CHAR (
TO_DATE (MAX (TRAN_TIME), 'YYYY/MM/DD HH24: MI: SS'),
'YYYY/MM/DD HH24: MI: SS')
The FROM MWIPLOTHIS
WHERE LOT_ID=ihs. LOT_ID
AND OLD_OPER=ihs. OLD_OPER
AND HIST_DEL_FLAG & lt;>
'Y'AND TRAN_CODE='START')
AS S_TIME_ST,
(SELECT TO_CHAR (
TO_DATE (MAX (TRAN_TIME), 'YYYY/MM/DD HH24: MI: SS'),
'YYYY/MM/DD HH24: MI: SS')
The FROM MWIPLOTHIS
WHERE LOT_ID=ihs. LOT_ID
AND OLD_OPER=ihs. OLD_OPER
AND FROM_TO_FLAG='T'
AND HIST_DEL_FLAG & lt;>
'Y'AND TRAN_CODE='SPLIT)
AS S_TIME_SP,
(SELECT TO_CHAR (
TO_DATE (MAX (TRAN_TIME), 'YYYY/MM/DD HH24: MI: SS'),
'YYYY/MM/DD HH24: MI: SS')
The FROM MWIPLOTHIS
WHERE LOT_ID=ihs. LOT_ID
AND OLD_OPER=ihs. OLD_OPER
AND HIST_DEL_FLAG & lt;>
'Y'AND TRAN_CODE='END')
AS SLT_END_TIME,
(CASE WHEN HIS. OLD_OPER='6061' THEN '1' ELSE '2' END)
AS TEST_TYPE,
(SELECT TRAN_CMF_4
The FROM MWIPLOTHIS
WHERE LOT_ID=ihs. LOT_ID
AND OLD_OPER=ihs. OLD_OPER
AND TRAN_CODE='START'
AND HIST_DEL_FLAG & lt;> 'Y')
AS P_TEST_PGM_VER,
(SELECT TRAN_CMF_7
The FROM MWIPLOTHIS
WHERE LOT_ID=ihs. LOT_ID
AND OLD_OPER=ihs. OLD_OPER
AND TRAN_CODE='START'
AND HIST_DEL_FLAG & lt;> 'Y')
AS P_TEST_PGM_NAME,
Ihs. START_RES_ID
AS EQP_ID,
Ihs. QTY_3
AS the QTY,
(SELECT CMF_4
The FROM EDI_812_EWO
WHERE WO_NUMBER=ELT. CUST_DATA_2
AND SHIP_LOT_ID=ELT. CUST_DATA_1)
AS END_CUST,
(SELECT LOT_TYPE
The FROM EDI_812_EWO
WHERE WO_NUMBER=ELT. CUST_DATA_2
AND SHIP_LOT_ID=ELT. CUST_DATA_1)
AS LOT_TYPE,
(SELECT TRAN_CMF_4
The FROM MWIPLOTHIS
WHERE LOT_ID=ihs. LOT_ID
AND OLD_OPER='6062'
AND TRAN_CODE='START'
AND HIST_DEL_FLAG & lt;> 'Y')
AS F_TEST_PGM_VER,
(SELECT TRAN_CMF_7
The FROM MWIPLOTHIS
WHERE LOT_ID=ihs. LOT_ID
AND OLD_OPER='6062'
AND TRAN_CODE='START'
AND HIST_DEL_FLAG & lt;> 'Y')
AS F_TEST_PGM_NAME
The FROM MWIPLOTHIS ihs, MWIPLOTSTS STS, MWIPELTSTS ELT
WHERE HIS. LOT_ID=STS. LOT_ID
AND ihs. LOT_ID=ELT. LOT_ID
AND ihs. TRAN_TIME & gt; : S_TIME
AND ihs. TRAN_TIME & lt; : E_TIME
AND ihs. TRAN_CODE='LOTBDC'
AND ihs. FACTORY='TEST'
AND ihs. LOT_CMF_2='812'
AND HIS OLD_OPER IN (' 6062 ', '6061')
AND ihs. HIST_DEL_FLAG & lt;> 'Y')
The ORDER BY TEST_DATE ";