Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Split into 2 columns

User_7FAONMar 31 2022

Table Name - 'Sample'

Test
--------
INR
1,2,3
4,5
PVR
6,7

Question : How to split this a single columns data into two columns!

Expected Output :

A B
---------
INR 1

INR 2

INR 3

INR 4

INR 5

PVR 6

PVR 7

I don't know how to solve this kind of questions. I tried in some other different way and got unexpected Output.(I know this may look illogical)

Select I. Test as A, J.Test as B
from Sample I, Sample J
where J. Test = I. Test;

Can anyone help me regarding this!

This post has been answered by BluShadow on Apr 1 2022
Jump to Answer
Comments
Post Details
Added on Mar 31 2022
7 comments
508 views