Home » SQL & PL/SQL » SQL & PL/SQL » How to create rows for each character string in a field? (Oracle 10g)
How to create rows for each character string in a field? [message #334675] Thu, 17 July 2008 11:14 Go to next message
SobeNo
Messages: 14
Registered: June 2008
Junior Member
Hello Everyone,

I need some help with this please...

Lets say I have a table some thing like this.

Quote:

USER_NAME.........LEVEL
mike...................123
paul....................12
sam....................13



The column LEVEL is a combination of numerical characters.

How would I make it (the result set or another view/table) to some thing like this....?

Quote:

USER_NAME......NEW_LEVEL
mike...................1
mike...................2
mike...................3
paul....................1
paul....................2
sam....................1
sam....................3



Any help or direction for this would be greatly appreciated.

I tried searching the net but was not able hit the actual solution, possibly i didnt uset the exact term/phrase to do so.

Thanks in advance
Sobe
Re: How to create rows for each character string in a field? [message #334677 is a reply to message #334675] Thu, 17 July 2008 11:21 Go to previous message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Search for "pivot/unpivot", "column to rows", strins list and the like.
This kind of question is regularly asked for column value like "1,2,3" but it is the same without ",".

Regards
Michel
Previous Topic: Partitioning Factor
Next Topic: PLSQL procedure to split Partition table
Goto Forum:
  


Current Time: Fri Dec 09 21:43:41 CST 2016

Total time taken to generate the page: 0.06128 seconds