Re: data row

From: Curtis <cmarchand_at_norambar.ca>
Date: 13 May 2004 05:35:15 -0700
Message-ID: <77459c6d.0405130435.666330b8_at_posting.google.com>


[Quoted] 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 .
>

[Quoted] 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 Received on Thu May 13 2004 - 14:35:15 CEST

Original text of this message