Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Reg: Split string

Madhu.149Jan 29 2015 — edited Jan 29 2015

Dear All,

Oracle Database 11g R2 11.2.0.1 SE1

Consider the below string

Madhu, No 34 Church street, main road, TMK

I need to split the string based on the below conditions.

Condition 1: Split string 35 characters each

Condition 2: search until previous comma and display upto comma.

Condition 3: split for next 35 characters.

Required output for above string

Addr1Addr2
Madhu, No 34 Church streetmain road, TMK

Comment:

Condition 1: Addr1 --> 35 char = Madhu, No 34 Church street, main ro

Condition 2: Addr1 --> search previous comma-->so output--> Madhu, No 34 Church street

Condition 3: Addr2 --> Search for next 35 characters (i.e from 'main road') --> Condition 1 --> Condition 2

Kindly help with this regard.

This post has been answered by John Stegeman on Jan 29 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 26 2015
Added on Jan 29 2015
8 comments
344 views