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: Alter RowID Sequence

Re: Alter RowID Sequence

From: Alan Moor <asmoor_at_ix.netcom.com>
Date: Sat, 14 Aug 1999 19:18:56 -0400
Message-ID: <7p4ubg$8ue@dfw-ixnews5.ix.netcom.com>


declare
  cursor val_csr is
    select * from table_1 order by value; begin
  for c1 in val_csr loop
    insert into table_2 values (c1.rowid, c1.value);   end loop;
end;
/

tabates_at_my-deja.com wrote in message <7onib6$40o$1_at_nnrp1.deja.com>...
>I have an application that will process rows within a table based on
>the increasing RowID Value. What I am aiming to do is to massage the
>data to allow for changing the sequence in which items are processed
>while still using the RowID as the sequence number.
>
>e.g. Table1
>RowID Value
>1 4
>2 3
>3 5
>4 6
>
>I have an identical table called Table2
>
>I tried:
>Insert into Table2 Select * from Table1 Order by Value;
>
>Based on the assumption that this would create the following in Table2:
>RowID Value
>1 3
>2 4
>3 5
>4 6
>
>However, I get the following error.
>ORA-00933: SQL command not properly ended
>
>Then I planned on using
>Delete from Table1;
>Insert into Table1 Select * from Table2;
>Delete from Table2;
>
>Any suggestions welcomed.
>
>Regards,
>TABates
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Sat Aug 14 1999 - 18:18:56 CDT

Original text of this message

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