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 a single row into more rows

MagSassJun 4 2017 — edited Jun 6 2017

Hi All,

I am trying to split a single row into more rows

At the moment my query returns:

   

Student_NumberLastFirstmotherdayphonefatherdayphone
1Mouse, Mickey555390292555390297
2Duck, Donald555390293555390298

But it needs to look like this:

  

Student_NumberLastFirstphone
1Mouse, Mickey555390292
1Mouse, Mickey555390297
2Duck, Donald555390293
2Duck, Donald555390298

From the above you can see that in the first query, both phone parents phone numbers are returned in a single record. I want to split up record so that the parents phone numbers appear as different records.

My query looks like this at the moment:

select

Student_Number,

LastFirst,

motherdayphone,

fatherdayphone

from students

Thanks for any assistance!!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 4 2017
Added on Jun 4 2017
6 comments
7,184 views