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: SQL HELO PLEASE !!!!!!!!!!

Re: SQL HELO PLEASE !!!!!!!!!!

From: Dan White <daniel.g.white_at_verizon.net>
Date: Wed, 5 Dec 2001 01:26:55 -0500
Message-ID: <9ukf7g0tt@enews4.newsguy.com>


The following query gives me the order that I need

select code,create_date, expire_date,status from dw_project_dim
order by code,create_date

"Robert Chin" <robert_chin_2000_at_hotmail.com> wrote in message news:HLbP7.109893$z8.14699697_at_news02.optonline.net...
> First does this table have a PK ?
> The thing is I thought that the theory is that SQL engine doesn't give a
> monkey's
> ass (or monkey's tits) about the "order" of the placement of the rows
> in the result set so hard part for me is: how can you guarrantee
> yourself that row(x) should get the updates from row(x+1) ? ie
> how do you define the relationship btw row(x) and row(x+1) ?
>
> Robert
>
>
> "Dan White" <dwhite_at_icimail.com> wrote in message
> news:9uj8qu029nj_at_drn.newsguy.com...
> > Hello all,
> >
> > I have the following problem
> > I have column the was incorectly populated(over time)
> > what I need to do is updqte the expiration_date column to the correct
> value
> > here is my data(i have approxametly 8,000,000 rows to do this on )LN is
> not an
> > actual value in the table but only for illistration purposes
> > what I need to do is update the expiration_date from LN1 to the
> create_date of
> > Ln 2
> > and the expire date of ln2 with the create_date of ln3
> > ANY HELP IS GREATLY APPRICATED AND THANKS IN ADVANCE
> >
> > what I have
> > LN code create_date expire_date status
> > ------- -------------------- --------------------- ------------
> > 1 1002 07-SEP-2001 14:57:15 22-OCT-2001 07:42:26 N
> > 2 1002 13-SEP-2001 01:01:35 22-OCT-2001 07:42:26 N
> > 3 1002 22-OCT-2001 07:42:26 Y
> >
> > What I want to see
> > LN code create_date expire_date status
> > ------- -------------------- --------------------- ------------
> > 1 1002 07-SEP-2001 14:57:15 13-SEP-2001 01:01:35 N
> > 2 1002 13-SEP-2001 01:01:35 22-OCT-2001 07:42:26 N
> > 3 1002 22-OCT-2001 07:42:26 Y
> >
> > Dan White
> > programmer/analyst
> >
>
>
Received on Wed Dec 05 2001 - 00:26:55 CST

Original text of this message

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