F
FifthRing
I am a novice with Access and am stumped on a query design.
I have a database with two tables. The first table has closing prices for
various stocks and the structure looks like such:
Ticker Date Price
C 1/4/10 3.4
C 1/5/10 3.53
C 1/6/10 3.64
YHOO 1/4/10 17.10
YHOO 1/5/10 17.23
YHOO 1/6/10 17.17
I have another table that looks like this:
Ticker Date1 Date2
C 1/5/10 1/6/10
YHOO 1/4/10 1/5/10
I want to build a query that will join the price when the dates and tickers
match in both tables. It would end up like this:
Ticker Date1 Date2
C 3.53 3.64
YHOO 17.10 17.23
I was able to do this with INNER JOIN one query at a time. I would add
prices for one date column to the last query and repeat for however many
dates columns I wanted to have. The problem is that I want to have up to 60
dates to look up. I want to have one query to show the results without
writing 60 separate queries.
Any ideas on how to solve this?
I have a database with two tables. The first table has closing prices for
various stocks and the structure looks like such:
Ticker Date Price
C 1/4/10 3.4
C 1/5/10 3.53
C 1/6/10 3.64
YHOO 1/4/10 17.10
YHOO 1/5/10 17.23
YHOO 1/6/10 17.17
I have another table that looks like this:
Ticker Date1 Date2
C 1/5/10 1/6/10
YHOO 1/4/10 1/5/10
I want to build a query that will join the price when the dates and tickers
match in both tables. It would end up like this:
Ticker Date1 Date2
C 3.53 3.64
YHOO 17.10 17.23
I was able to do this with INNER JOIN one query at a time. I would add
prices for one date column to the last query and repeat for however many
dates columns I wanted to have. The problem is that I want to have up to 60
dates to look up. I want to have one query to show the results without
writing 60 separate queries.
Any ideas on how to solve this?