我有这个查询通过sql developer运行良好但在应用程序中运行时抛出错误:
"SELECT DECODE(STATE_ID, 7, 'INPROGRESS','NOT_INPROGRESS')STATUS "+
"FROM ((SELECT A.STATE_ID FROM DSP_SIM_INVENTORY_DTLS A, DSP_TRANSACTION_DTLS B "+
"WHERE A.IMSI = B.IMSI AND B.MSISDN_D = ? AND A.ORDER_ID = ? AND A.IMSI = ? "+
"UNION ALL"+
"SELECT C.STATE_ID FROM DSP_SIM_STC_DTLS C"+
"WHERE C.MSISDN_D = ? AND C.ORDER_ID = ? AND C.IMSI = ?) )"
请帮我解决这个问题。
答案 0 :(得分:0)
字符串之间有空格,而且
上还有一些()"SELECT DECODE(STATE_ID, 7, 'INPROGRESS','NOT_INPROGRESS')STATUS "+
" FROM ( (SELECT A.STATE_ID FROM DSP_SIM_INVENTORY_DTLS A, DSP_TRANSACTION_DTLS B "+
" WHERE A.IMSI = B.IMSI AND B.MSISDN_D = ? AND A.ORDER_ID = ? AND A.IMSI = ? )"+
" UNION ALL "+
" ( SELECT C.STATE_ID FROM DSP_SIM_STC_DTLS C "+
" WHERE C.MSISDN_D = ? AND C.ORDER_ID = ? AND C.IMSI = ?) ) "