Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Understanding TRUNC in SELECT/UPDATE
My mistake. Copy/paste error.
UPDATE TEST A SET DAYSTONEXTDATE = TRUNC((SELECT
MIN(STARTDATE)-TRUNC(A.STARTDATE) FROM TEST
WHERE STARTDATE > A.STARTDATE))
works fine.
Why wouldn't I use a trunc in the subquery? Ok. Let me explain again. You can't combine the result of a subquery with a single function. Just like you can't say I have a table and want to add the value 1.
Arian Received on Fri Feb 24 2006 - 11:14:58 CST