0

我正在处理一个请求,我想我错过了一个子句,因为我在第 1 行遇到了这个错误 ERROR: ORA-00933: SQL command not properly end

请求:

echo "update account_balances_t set credit_limit='51200' inner join account_t on account_t.poid_id0=account_balances_t.obj_id0  where access_code1 in (SELECT DISTINCT ACCESS_CODE1,REC_ID FROM  ACCOUNT_T A, ACCOUNT_PRODUCTS_T AP WHERE A.STATUS != 10103  AND A.ACCESS_CODE1 IS NOT NULL AND A.POID_ID0 = AP.OBJ_ID0 AND AP.PRODUCT_OBJ_ID0 = (SELECT POID_ID0 FROM PRODUCT_T WHERE NAME = 'IEW - Europe Daily Plan 1')); "|sqlplus -s `whoami`/`whoami`@$ORACLE_SID

错误 :

SELECT DISTINCT ACCESS_CODE1,REC_ID FROM  ACCOUNT_T A, ACCOUNT_PRODUCTS_T AP WHERE A.STATUS != 10103  AND A.ACCESS_CODE1 IS NOT NULL AND A.POID_ID0 = AP.OBJ_ID0 AND AP.PRODUCT_OBJ_ID0 = (SELECT POID_ID0 FROM PRODUCT_T WHERE NAME = 'IEW - Europe Daily Plan 1'))
                                                                                                                                                                                                                                                                   *
ERROR at line 1:
ORA-00933: SQL command not properly ended
4

3 回答 3

1

你基本上有这个:

UPDATE account_balances_t
SET credit_limit='51200'
INNER JOIN account_t ON account_t.poid_id0=account_balances_t.obj_id0
WHERE access_code1 IN (...);

在. _UPDATE

此外,您正在尝试将列access_code1与返回列的子查询匹配。

于 2013-07-17T09:35:34.777 回答
0
UPDATE PEOPLE a
SET a.SURNAME = (
    select b.SURNAME
    from PEOPLE b
    where b.NI.NO = a.NI_NUMBER
) 
于 2015-02-17T06:28:17.510 回答
0

update account__balances_t set credit_limit='51200' inner join account_t on .....

语法不好——oracle 在这里不支持“内连接”。正确的语法是:

UPDATE table SET colum=expression [,column = expression ... ]
WHERE condition<br>

在这里阅读:http: //docs.oracle.com/cd/B19306_01/server.102/b14200/statements_10007.htm

于 2013-07-17T09:35:40.887 回答