SQL Language (MOSC)

MOSC Banner

SQL Parsing Problem

edited Jun 18, 2013 2:25PM in SQL Language (MOSC) 8 commentsAnswered ✓
Hello,

I'm trying to parse a column to extract multiple occurances of the same pattern of data from that column. 

1.  The column comment is defined as:      COMMENT             VARCHAR2(4000 BYTE),

2.  The select looks like this:

select
 comment
from
 account_number ti
where
ti.account_no = 123

3.  The result set looks like this:

4/23/2013 3:03:30 PM xxxxxxxxxxxxxxxxxxx
4/23/2013 3:03:33 PM yyyyyyyyyyyyyyyyyyy 
4/23/2013 3:15:33 PM zzzzzzzzzzzzzzzzzzz
4/25/2013 13:46:36 PM INCIDENT PPPPP BY NNNN
4/25/2013 1:48:56 PM aaaaaaaaaaaaaaaaaaa
4/25/2013 1:48:57 PM bbbbbbbbbbbbbbbbbbb
4/25/2013 1:49:51 PM INCIDENT PPPPP BY NNNN
4/25/2013 1:49:52 PM cccccccccccccccccccc

4.  A carriage control is between each row.

5.  I would like to select only those rows within the COMMENT column that have INCIDENT PPPPP BY NNNN

6.  This SQL does an extract on the first INCIDENT:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center