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: partitioning on column with initial null value

Re: partitioning on column with initial null value

From: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 15 Jun 2005 21:35:50 -0700
Message-ID: <1118896558.28311@yasure>


upuaut_at_yahoo.com wrote:
> Thank You Daniel..
>
> if I put the week number during the insert, would the above scenario be
> viable? ie, any other issues besides this? I have no reason not to put
> it upfront!. I was just curious how it would work.
>
> As for patches, we have no DBA at this time to take care of this.
>
> Thank you for your help.
> kal.

You could either write a function that does the calculation and use it in your insert statement:

INSERT INTO t
(col1, col2, col3)
VALUES
(myfunction(somevalue), val2, val3);

or use a BEFORE INSERT TRIGGER and do something like:

:NEW.col1 := whatever_does_the_calculation;

HTH

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Wed Jun 15 2005 - 23:35:50 CDT

Original text of this message

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