This is SQL Table(UserTable)
ROWNO| CODE |CODEID
-----+--------------------------------------------+-------------+
1 ABD~Monthly~1~2~3~4~5!INDIA~Weekly~1~2~2~3~1 19
2 CED~Weekly~1~3~3~4~5!SA~Weekly~4~2~2~3~5 20
The Code Column Contains Complex Statement with Lots of delimiters
The Delimiter ~ denotes Column and ! denoted Row
I have to bring it back as a result like this
CODE1| CODE2 |CODE3|CODE4|CODE5|CODE6|CODE7|CODEID
-----+-------+-----+-----+-----+-----+-----+------+
ABD Monthly 1 2 3 4 5 19
INDIA Weekly 1 2 2 3 1 19
CED Weekly 1 3 3 4 5 20
SA Weekly 4 2 2 3 5 20
Please Somebody help me here to get the query !
Thanks in advance , Jayendran