我想从表ITEM_BILLED
更新属性CUSTOMER_ACCOUNT
。我传递了一些参数,这些参数从4个表中筛选出匹配数据。 select语句运行良好,并返回匹配的行。我有以下更新查询
UPDATE CUSTOMER_ACCOUNT A1
SET A1.ITEM_BILLED='Y'
WHERE
(SELECT A.ITEM_BILLED
FROM
CUSTOMER_ACCOUNT A,
BILLING B,
BILLING_CAMPUS C,
BILLING_DETAIL D
WHERE
A.PERSON_ID=:PERSON_ID AND
A.ACADEMIC_YEAR=B.ACADEMIC_YEAR AND
A.ITEM_BILLED=:ITEM_BILLED AND
A.INSTITUTE_ID=:INSTITUTE_ID AND
A.INSTITUTE_ID=B.INSTITUTE_ID AND
A.INSTITUTE_ID=C.INSTITUTE_ID AND
A.INSTITUTE_ID=D.INSTITUTE_ID AND
B.BILLING_ID=:BILLING_ID AND
B.BILLING_ID=C.BILLING_ID AND
B.BILLING_ID=D.BILLING_ID AND
A.CAMPUS_ID=C.CAMPUS_ID AND
A.CLASS_ID=C.CLASS_ID AND
A.ITEM_GROUP_ID=D.ITEM_GROUP_ID AND
A.ITEM_ID=D.ITEM_ID AND
A.BILLING_CYCLE_ID=B.BILLING_CYCLE_ID AND
A.BILLING_PERIOD_ID=B.BILLING_PERIOD_ID)