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: Alien <stijf_at_stijf.com>
Date: 24 Feb 2006 09:14:58 -0800
Message-ID: <1140801298.445732.36650@p10g2000cwp.googlegroups.com>


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

Original text of this message

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