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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Joining months..?

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,

I have a table (Table1) with values and dates.
The dates are representing whole months.
Example: The date 2001-10-01 means from the first to the last october.

The second table (Table2) has dates and values but here are the dates only dates. So a date with 2001-10-25 means 25:th of october.

This is what I want to do:
I want to join Table1 with Table2 on the date column so that all similar months are connected to each other.

Like this:
Table1Month Table1Value Table2Date Table2Value
2001-10-01 100 2001-10-25 200
2001-10-01 300 2001-10-26 400


How can I join on dates?

/Kent J.















 
I would create calculated 'like' fields in queries sourcing each of the tables, as in:

YrMo: Format(DateField, "YYYYMM")

generate one more query using the calculated field [YrMo] in the join.



MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top