how can i split one table into two tables?

Posted by Rajesh123 under Oracle on 8/31/2015 | Points: 10 | Views : 700 | Status : [Member] | Replies : 2
Hi this is my main table..but this split in two table like below output tables.
How can i write the query please rply frds.
EMPLOYEE_PHONE
SSN (PK) NAME PHONES
123456789 Wiles, A. 1122334455, 3344556677, 6677889944
234567890 Newton, I. 3399118822, 3399554773
345678901 Turing, A 2266001993
456789012 Gauss, C.F. 4466577853



Output:1

EMPLOYEE_NAME
SSN (PK) NAME
123456789 Wiles, A.
234567890 Newton, I.
345678901 Turing, A
456789012 Gauss, C.F.

Output:2
EMPLOYEE_PHONE
SSN (PK) PHONES (PK)
123456789 1122334455
123456789 3344556677
123456789 6677889944
234567890 3399554773
234567890 3399118822
345678901 2266001993
456789012 4466577853


rajesh.plsql123@gmail.com


Responses

Posted by: Rajayadav on: 9/1/2015 [Member] Starter | Points: 25

Up
0
Down
Hi,

Try like this

Query 1:

select SSN,NAME from EMPLOYEE_PHONE


Query 2:

select SSN, PHONES EMPLOYEE_PHONE



If you no please describe your question

Thanks
-Raja

Rajesh123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 9/4/2015 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi

Try to union or pivot concept for fixed in this Query.

Mark as Answer if its helpful to you

Kumaraspcode2009@gmail.com

Rajesh123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response