All Forums Database
20 Nov 2014
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:
gbindra 4 posts Joined 06/12
20 Nov 2014

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

Raja_KT 1246 posts Joined 07/09
20 Nov 2014

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.

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.