Home » SQL & PL/SQL » SQL & PL/SQL » creating a unified table from many tables (Oracle 10.2.0.1.0)
creating a unified table from many tables [message #340024] Mon, 11 August 2008 01:48 Go to next message
raed_237
Messages: 19
Registered: August 2008
Junior Member
hello all

this is my first post here Smile
i have this problem as i have many tables, each table consist of these three columns:

Vodafone Table

Destination---Country_Code(PK)----Price_per_min_USD
UK--------------0044----------0.05
USA-------------0012----------0.07
UAE-------------0097----------0.04

at the moment i have about ten tables, what i need to do is to create one unified table that includes all the data in the original tables so it will look something like this

unified table

Destination---Country_Code----Vodafone_Price---Orange_Price---sygmatell_Price--etc...

i also need to remove any duplication in the unified table,also i need to make sure that all the destinations for all the tables are available.

thanks in advance

Re: creating a unified table from many tables [message #340028 is a reply to message #340024] Mon, 11 August 2008 01:54 Go to previous messageGo to next message
rajatratewal
Messages: 507
Registered: March 2008
Location: INDIA
Senior Member
Use UNION.

Regards,
Rajat
Re: creating a unified table from many tables [message #340039 is a reply to message #340024] Mon, 11 August 2008 02:35 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use FULL OUTER JOIN.

And please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Re: creating a unified table from many tables [message #340045 is a reply to message #340024] Mon, 11 August 2008 03:24 Go to previous message
raed_237
Messages: 19
Registered: August 2008
Junior Member
many thanks guys, much appreciated
Previous Topic: Flag this message Is 'select' a part of Oracle DML language
Next Topic: printing special character
Goto Forum:
  


Current Time: Thu Dec 08 18:43:36 CST 2016

Total time taken to generate the page: 0.13289 seconds