I'm not sure why this query fails
I got the error 'operation must be an updatable query'
If I remove the (SELECT SUM() ...) and just us a number then it works fine (i.e. SET TOTAL = 10). Also, my SELECT statement only returns a single value so it should be ok too.
Thanks for any help
Code:
PARAMETERS custid Long
UPDATE CUSTOMERS
SET TOTAL =
(SELECT SUM(DETAILS.CHARGE) FROM DETAILS WHERE DETAILS.CUSTOMER = custid)
WHERE CUSTOMERS.ID = custid;
I got the error 'operation must be an updatable query'
If I remove the (SELECT SUM() ...) and just us a number then it works fine (i.e. SET TOTAL = 10). Also, my SELECT statement only returns a single value so it should be ok too.
Thanks for any help