Home » SQL & PL/SQL » SQL & PL/SQL » complex view (oracle)
complex view [message #625881] Wed, 15 October 2014 06:54 Go to next message
mukulpratap43
Messages: 1
Registered: October 2014
Location: India
Junior Member
Hi can anyone help me with the below query.

table1
productcode| name
47 | x
48 | y
56 | z

table2
mobileno |code_1|code_2|code_3|code_4|code_5|code_6
7795409665 |47 |48 |49 |51 |52 |56


looking to create a view with below column and data

mobileno |code_1|name|code_2|name|code_3|name|code_4|name|code_5|name|code_6|name
77956409665|47 |x | 48 |y |49 | |51 | | 52 | | 56 |z
Re: complex view [message #625885 is a reply to message #625881] Wed, 15 October 2014 08:13 Go to previous message
Michel Cadot
Messages: 68643
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Welcome to the forum.
Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Also always post your Oracle version, with 4 decimals.

Take care in which (sub)forum you post your question. This is a SQL question and has nothing to do with Backup & Recovery.
If you post a working Test case: create table and insert statements along with the result you want with these data then we will work with your table and data and show you.

This is a standard "PIVOT" question, please search for this keyword.

Previous Topic: Please help in this problem
Next Topic: DBMS_SCHEDULER and perl script
Goto Forum:
  


Current Time: Tue Apr 23 05:51:18 CDT 2024