Actually it didn't solve the problem entirely. The query looks more like:
UPDATE monthly_totals mt
SET
checking_total=nvl(
(SELECT sum(check_amount) FROM checks c
WHERE c.customer_id=mt.customer_id
and c.month=mt.month)
,0),
previous_balance=nvl(...
Yes, I simplified the query to my problem. It's quite
a bit more complex than what is shown above. I did end up
doing what carp did above. If the nvl on the function
is invalid, then why did it work at sqlplus without
the begin/end wrapped around it?
I run the following in sqlplus and get an error.
-------------------------------------
BEGIN
UPDATE account
SET
activity_total = nvl((SELECT 5 FROM dual),0);
END
-------------------------------------
However when I run the following in sqlplus...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.