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!

How to split a string into columns

user560737Feb 26 2013 — edited Feb 26 2013
Hello to all ,

Having a strings like this, where pipe(|) is his delimiter
10:00 | x1 | 2 | RO | P | Con ausilio  | y1
10:10 | x2 | 1 | RO |  |  | y2
10:20 |x3 | 3 |  |  |  | y3
10:30 |x4 | 3 | RO | N | Con aiuto  | y4
10:40 |x5 | 1 | RO |  |  | y5
 
how can I break it up into columns, for example, the first char(before first pipe) insert in first variable, 
then, after first pipe,  second characters in a other column ans so on
 
col1 := '10:00';
 
col2 := 'x1';
col3 := '2';
col4:= 'RO';
col5 := 'P';
col6 := ' Con ausilio ';
col7 := 'y1';
 
 
col1 := '10:10';
col2 := 'x2';
.. and so on
 
thanks in advance
This post has been answered by Frank Kulash on Feb 26 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2013
Added on Feb 26 2013
5 comments
1,970 views