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!

combining two tables?

Status
Not open for further replies.

Toby1kenobe

Instructor
May 26, 2002
66
GB
HI

In order to produce a graph with two traces i need to use a query to combine two tables. The tables are called "Daily Points" and "Daily Points S and L". Both tables have a 'date' field and 'daily points' field. For my graph i need 'Daily Points' from both tables where the dates are the same. I need the dates too. This sounded easy to do but i had no luck.

Any help is always greatly appreciated
Thanks
Toby
 
Give this a try:
Select DP.DateField, DP.[Daily Points] as DP_DailyPoints, DPSL.[Daily Points] as DPSL_DailyPoints
FROM [Daily Points] as DP INNER JOIN [Daily Points S and L] as DPSL on DP.DateField = DPSL.DateField
Order By DB.DateField;

I order the results by the date field. This query links the two tables on an INNER JOIN meaning only records that match on the date field will be returned.

Post back with any questions or comments.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top