Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Understanding TRUNC in SELECT/UPDATE

Re: Understanding TRUNC in SELECT/UPDATE

From: Robert Wachtel <rwachtel_at_gmx.de>
Date: Fri, 24 Feb 2006 15:49:38 +0100
Message-ID: <468koaFa1jg0U1@individual.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US