Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Oracle replace functionality

Oracle replace functionality

Scheduled Pinned Locked Moved Database
toolsoraclecomtestingquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    padmanabhan N
    wrote on last edited by
    #1

    Hi, My requirement is, i have to update a column with replace funtionality eg., column1 ------- this is columnA columnA is here after update, column1 ------- this is columnB columnB is here i have to update only A with B... Any idea or code samples will be very much appreciated.

    Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

    C W 2 Replies Last reply
    0
    • P padmanabhan N

      Hi, My requirement is, i have to update a column with replace funtionality eg., column1 ------- this is columnA columnA is here after update, column1 ------- this is columnB columnB is here i have to update only A with B... Any idea or code samples will be very much appreciated.

      Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

      C Offline
      C Offline
      CitrusTech
      wrote on last edited by
      #2

      I think I may have misunderstood (esp. due to reference to ColumnB), but replace will do it: SQL> select C from dave; C -------------------------------------------------------------------------------- this is columnA columnA is here SQL> update dave set c = replace(C, 'columnA', 'NewText'); 2 rows updated. SQL> select C from dave; C -------------------------------------------------------------------------------- this is NewText NewText is here SQL> Dave ---- Data Exploration and Data Profiling Tools[^]

      1 Reply Last reply
      0
      • P padmanabhan N

        Hi, My requirement is, i have to update a column with replace funtionality eg., column1 ------- this is columnA columnA is here after update, column1 ------- this is columnB columnB is here i have to update only A with B... Any idea or code samples will be very much appreciated.

        Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

        W Offline
        W Offline
        www Developerof NET
        wrote on last edited by
        #3

        padmanabhan N wrote:

        i have to update only A with B...

        If that`s the case then simply update columnA with columnB eg:

        update mytable set mytable.columnA=mytable.columnB where .....

        When you fail to plan, you are planning to fail.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups