sql - ora-00936 missing expes -
i can't find what's wrong in code.
update order_items o set (discount_amount) = select t.maxdiscount (select customer_id , o.order_id order_id, d.product_id product_id, d.total, e.maxdiscount maxdiscount orders o, (select sum(quantity)as total, order_id, product_id order_items group order_id, product_id) d, (select max(discount_amount) maxdiscount, product_id order_items group product_id) e o.order_id = d.order_id , e.product_id = d.product_id) t exists t.order_id = o.order_id , t.product_id = o.product_id;
the message is:
- 00000 - "missing expression"
no idea what's problem. in advance!
update order_items o set discount_amount = (select t.maxdiscount (select customer_id, o.order_id order_id, d.product_id product_id, d.total, e.maxdiscount maxdiscount orders o, ( select sum (quantity) total, order_id, product_id order_items group order_id, product_id) d, ( select max (discount_amount) maxdiscount, product_id order_items group product_id) e o.order_id = d.order_id , e.product_id = d.product_id) t t.order_id = o.order_id , t.product_id = o.product_id);
Comments
Post a Comment