SELECT SUBSTR(MESG,98,15) AS ACC,FROM TBAADM.RTT WHERE CUST_OR_CARD_ID= "+No+"'" +
"AND TO_DATE(TO_CHAR(SYSTEM_DATE_TIME,'MM-DD-YY'))= "+tranDate+"'" +
"AND TO_NUMBER(SNO)=' "+sno+"'" +
"AND DCC_ID='SWT' AND CMD='PRCR' AND BANK_ID='PMC01' ";
答案 0 :(得分:0)
你在某些地方有额外的报价,或者在其他地方错过了一些。并且应在From
之前删除额外的逗号。
"SELECT SUBSTR(MESG,98,15) AS ACC FROM TBAADM.RTT WHERE CUST_OR_CARD_ID= '"+No+"' " +
"AND TO_DATE(TO_CHAR(SYSTEM_DATE_TIME,'MM-DD-YY'))= '"+tranDate+"' " +
"AND TO_NUMBER(SNO)= "+sno+" " +
"AND DCC_ID='SWT' AND CMD='PRCR' AND BANK_ID='PMC01' ";