Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Understanding TRUNC in SELECT/UPDATE
Hi!
> You can't combine a subquery and a mathematical function. [...]
Isn't MIN() a mathematical function, too?
> Try:
> UPDATE TEST A SET DAYSTONEXTDATE = TRUNC((SELECT
> MIN(STARTDATE)-TRUNC(A.STARTDATE) FROM TEST
> WHERE STARTDATE > A.STARTDATE)) - TRUNC(A.STARTDATE);
Don't you use the TRUNC in the subquery, too?
Anyway, this is not what I wanted. You subtract the A.STARTDATE twice. If you read my msg again you see that I have a working statement. I just wanted to know the difference between the surrounding TRUNC and the TRUNC in the subquery.
Robert Received on Fri Feb 24 2006 - 08:49:38 CST