Re: data row

From: Kalev Kadak <otto_mommiste_at_yahoo.com>
Date: Thu, 13 May 2004 19:55:22 +0300
Message-ID: <40A3A87A.FDFE14BB_at_yahoo.com>


Curtis wrote:
>
> Turkbear <john.g_at_dot.spamfree.com> wrote in message news:<mpr4a0d5otjmtm02f76d8cb9lsgb9epi8g_at_4ax.com>...
> > cmarchand_at_norambar.ca (Curtis) wrote:
> >
> > >"David" <dacon_at_medinet-igd.com> wrote in message news:<c7nqog$ic5$1_at_nsnmpen3-gest.nuria.telefonica-data.net>...
> > >> Hello,
> > >>
> > >> Knows anybody how i can move data from a row to another row in the same
> > >> table?
> > >>
> > >> row A Data
> > >> 1
> > >> 2
> > >> 3
> > >> ....
> > >>
> > >> Move to row B (empy)
> > >>
> > >> I think that I can rename the rows, how i can do it?
> > >>
> > >> I'm using Oracle 8.1.7
> > >>
> > >> Thanks in advance.
> > >>
> > >> David
> > >
> > >This is the sql that will copy rowA to rowB.
> > >You can add where clause also.
> > >
> > >Update tableX set rowB = RowA;
> > >
> > >Curtis
> >
> > I cannot imagine that code working..( you cannot specify a row of Oracle data as the update info like that).
> > To duplicate the existing row ( if that is what David actually wants to do)
> > use
> > insert into table select * from table where
> > ( whatever identifies the row you want to duplicate - WHY you want duplicate records eludes me, however).
> >
> > There is simply not enough information provided to make a good reply..
> > How can 1 row have what looks like 3 rows of data?
> > David, please post the output of a DESC Table_name .
> >
>
> Well imagine reality for once. That code does work.
> I have table with 2 rows called
> qte_for_production and
> qte_left_to_be_loaded_for_production
>
> I'm not the original database creator. I worked with what I had.
>
> Row1 is the amount needed to produce the finished product.
> Row2 start out with amount of row1 and each time a quantity is
> loaded on production line, the amount is deducted from row2.
> When row2 is 0 then the item is finished.
>
> Curtis

Are you talking about rows or columns? Either way the update is simpliest possible use of UPDATE command with relevant WHERE clause.

Kalev Received on Thu May 13 2004 - 18:55:22 CEST

Original text of this message