Forum Stats

  • 3,838,749 Users
  • 2,262,397 Discussions
  • 7,900,750 Comments

Discussions

How To replace a string from a particular place

Rajan Sw
Rajan Sw Member Posts: 354 Blue Ribbon
edited Apr 11, 2017 5:52PM in SQLとPL/SQL

Hi , I have a column customer address like below where after each element there is a ; (semicolon)  . I want to replace a particular string between 3rd occurence of ; to 4th occurance of semicolon here in the case ITPL has to be changed to ITPB by looking up to another table .

The look up table is :

Post_lookup(old_post varchar2(100),new_post varchar2(100))

Old_post   new_post

ITPL           ITPB

2nd Flr; C Blndg;White filed;ITPL;Bangalore;

Please provide some ideas or apporach .

Thanks in advance ;

Current DB version

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

"CORE 11.2.0.4.0 Production"

TNS for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production

Tagged:

Answers

This discussion has been closed.