missing expression and then group function not allowed error [message #496009] |
Wed, 23 February 2011 12:41 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/7034efcfbd345953f31f21da5485f8f6?s=64&d=mm&r=g) |
luron234
Messages: 2 Registered: February 2011
|
Junior Member |
|
|
Hello, I am wondering what I am doing wrong. I have 2 tables used in this problem: ODETAILS and ORDERS.
ODETAILS has the following columns: ONO, PNO, QTY, COST
ORDERS has the following columns: ONO, CNO, ENO, RECEIVED, SHIPPED, ORDER_COST
UPDATE ORDERS
SET ORDER_COST= 1 * ( select SUM(
SELECT COST
FROM ODETAILS
WHERE ORDERS.PNO=ODETAILS.PNO
)
);
In ODETAILS there can be more than 1 row for 1 order. So I'm trying to add all the COSTs in ODETAILS.
|
|
|
|
|
|