I am getting data from two different table sources. What is the best way to combine them into one?
For example:
table one has the following columns:
date | time | exchange
table two has the following columns:
date | time | price | position
I want to combine them so I can create a table that has:
date | time | exchange | position | price
Sometimes position and exchange columns are empty. What is the best way to create this new table?
I would recommend further reading into SQL JOINs. SQL Joins
Then read up on how Views represent data from multiple tables: What is a View in Oracle?
Then read up on how SQL UNION combines results from multiple tables: http://www.orafaq.com/wiki/Union
Read up on Creating a table from a select: http://www.techonthenet.com/sql/tables/create_table2.php
Understand materialized Views: http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_6002.htm
This just scratches the surface. All of these will solve your requirement with various benefits and draw backs.