DOUBT - Oracle command to REPLACE data

From: Eriovaldo Andrietta <ecandrietta_at_gmail.com>
Date: Sat, 2 Jul 2011 15:46:21 -0300
Message-ID: <CAJdDhaNcfhioFyqgp1cP89p3WaEEmbEz+-GDyxpbMBAJZ9mdbA_at_mail.gmail.com>



Hi Friends,

   I have the following issue:

   I need to store a column VARCHAR2(45).

   If I am inserting data for first time I can , for example, save something like this:

      111110000000000000000000000000000000000000000

   When the line exists recorded in the table with the content above, and during my process I must updated the following, considering only character 1:

      000000000000000000000000000000101010101010100

   The final result must be as below, replacing only the character 1:

      111110000000000000000000000000101010101010100

  I know that I can do it:
     WHILE X < Y
       LOOP
         FINAL COLUMN := SUBSTR(N) || 1 || ....
      END LOOP;

 But is there any other way to do it, like regular expression or another command / instruction ?

Regards
Eriovaldo

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Jul 02 2011 - 13:46:21 CDT

Original text of this message