Split delimited Column into separate Rows

Database
Enthusiast

Split delimited Column into separate Rows

Hi Can anyone help me in solving this.....

 

Actually the code goes like this

sel

case when  division like '%REGION%' then division  else division || ' ' || 'REGION' end REGION_NAME,

Nodes,

SgSpeed,

SgUtil,

PortCount,

CAST(WeekEndingDate as DATE) WEEKENDINGDATE

from

 

Table

 

 

The out is like this right now

 

Western New England REGION          VT000501-VT000502           92,160,000    10.33     3     10/11/2014

California REGION                             QCDEC-QCDED                     107,520,000   19.42    4      10/11/2014

California REGION                             GXDDA-GXDDB                     107,520,000   39.14    4      10/11/2014

Freedom REGION                              LY496                                  92,160,000      27.66   3      8/23/2014

California REGION                         SCCHA-SCCHB-SCCHC-SCCHD   107,520,000    22.14  4      11/1/2014

 

 

The output should look as

 

Western New England REGION          VT000501           92,160,000    10.33     3     10/11/2014

Western New England REGION          VT000502           92,160,000    10.33     3     10/11/2014

...........

Tags (1)
2 REPLIES
Enthusiast

Re: Split delimited Column into separate Rows

Looks like your delimiter is '-' if yes you can use recusrive to split the data into rows. IF you provide input then it will help further

Enthusiast

Re: Split delimited Column into separate Rows

Looks like Dieter has already tipped you to use TD_SYSFNLIB.STRTOK_SPLIT_TO_TABLE in your previous post, since you are already in 14.