Oracle replace functionality
-
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[^]
-
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[^]
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[^]
-
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[^]
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.