I have oracle table which has like below example in col7 column there will be values seperated , in one column it is kind of horizontal pivoting but the data is in 1 column seprated ,
In near future this col7 and col8 may have some more values
any inputs really helpfull. There is no pipe in the data for clear understanding I kept |
col1| clo2| col3| col4| clo5|col7 | col8
ahy |ahx |axs |aht |azs |LO1,LO2,LO3,LO4 |LH1,LH2,LH3
zas | bsz |dgf |asd |ans |LO5,LO6 |LH7
I need the ouptput like
col1 clo2 col3 col4 clo5 col7 col8
ahy ahx axs aht azs LO1 LH1
ahy ahx axs aht azs LO1 LH2
ahy ahx axs aht azs LO1 LH3
ahy ahx axs aht azs LO2 LH1
ahy ahx axs aht azs LO2 LH2
ahy ahx axs aht azs LO2 LH3
ahy ahx axs aht azs LO3 LH1
ahy ahx axs aht azs LO3 LH2
ahy ahx axs aht azs LO3 LH3
ahy ahx axs aht azs LO4 LH1
ahy ahx axs aht azs LO4 LH2
ahy ahx axs aht azs LO4 LH3
zas bsz dgf asd ans LO5 LH7
zas bsz dgf asd ans LO6 LH7
any ideas would really helpfull Thanks
Spliting the data from one coulmn sperated by ,
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am
I did this, it is easy to use loop variable. See the below example.
http://publib.boulder.ibm.com/infocente ... mple2.html
folks see this it is so easy good example
:)
http://publib.boulder.ibm.com/infocente ... mple2.html
folks see this it is so easy good example
![Smile :)](./images/smilies/icon_smile.gif)