Reputation: 31
i'm working on a request ,and i think i missed a clause because i having this error ERROR at line 1: ORA-00933: SQL command not properly ended
the request :
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
the error :
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
Upvotes: 0
Views: 10643
Reputation: 36127
update account__balances_t set credit_limit='51200' inner join account_t on .....
Syntax is bad - oracle doesn't support 'inner join' here. Correct syntax is:
UPDATE table SET colum=expression [,column = expression ... ]
WHERE condition<br>
Read here: http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_10007.htm
Upvotes: 0
Reputation: 1
UPDATE PEOPLE a
SET a.SURNAME = (
select b.SURNAME
from PEOPLE b
where b.NI.NO = a.NI_NUMBER
)
Upvotes: 0
Reputation: 146630
You basically have this:
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 (...);
I can't find anything similar among the available syntax variations for UPDATE
.
Also, you're attempting to match column access_code1
with a subquery that returns two columns.
Upvotes: 1