Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

joining two like tables 1

Status
Not open for further replies.

DrHabi

Technical User
Jan 22, 2002
103
US
How can I create a view to join two like tables into one. Both tables have the same fields and I would like to create a view to join them together. One is for current sales and the other is for posted sales and when I select a date range I want to be able to get data from both tables and add the like fields together.
Thanks
 
Are you looking to use a Union?

Code:
table1

union all

table2

The union will give you all rows from each table, using only one set of columns. Is this what you are after? A join will give you possibly ALL of the columns from each table, even though they are the same column names (of course proper syntax would need to be used for the second table columns). If you need help putting the union together, let us know.

thanks,

Rocco
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top