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

Home -> Community -> Usenet -> c.d.o.misc -> Re: column update order

Re: column update order

From: Charles Hooper <hooperc2000_at_yahoo.com>
Date: 21 Nov 2006 04:16:34 -0800
Message-ID: <1164111394.448745.107390@h48g2000cwc.googlegroups.com>


What's in a namespace wrote:
> "Charles Hooper" <hooperc2000_at_yahoo.com> schreef in bericht
> news:1164081790.296669.285220_at_f16g2000cwb.googlegroups.com...
> > Charles Hooper wrote:
> >> An individual UPDATE, INSERT, or DELETE will be consistent as of the
> >> time the DDL begins, as will a SELECT. Additionally, within a
> >> transaction, all SELECTs, UPDATEs, INSERTs, and DELETEs will be
> >> consistent as of the start of the transaction.
> >>
> >> Charles Hooper
> >> PC Support Specialist
> >> K&M Machine-Fabricating, Inc.
> >
> > Should state DML (manipulation) not DDL (definition), in case that
> > causes any confusion. DDL causes an implicit COMMIT.
> >
> > Charles Hooper
> > PC Support Specialist
> > K&M Machine-Fabricating, Inc.
> >
>
> Charles,
>
> I may have overlooked something, but I still don't understand why the column
> OLD_DATE is filled with sysdate in the first example, and filled correctly
> in the second example, for in both cases you did:
>
> UPDATE
> T4
> SET
> O_DATE=C_DATE,
> C_DATE=TRUNC(SYSDATE);
>
> Thanks,
>
> Shakespeare

This does not work as expected:
UPDATE
  T4
SET
  OLD_DATE=CURRENT_DATE,
  CURRENT_DATE=TRUNC(SYSDATE); This _does_ work as expected:
UPDATE
  T4
SET
  OLD_DATE=T4.CURRENT_DATE,
  CURRENT_DATE=TRUNC(SYSDATE); SELECT
  *
FROM
  V$RESERVED_WORDS
WHERE
  KEYWORD='CURRENT_DATE';

KEYWORD                RESERVED
CURRENT_DATE        N

Charles Hooper
PC Support Specialist
K&M Machine-Fabricating, Inc. Received on Tue Nov 21 2006 - 06:16:34 CST

Original text of this message

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