Hi there,
Kinda new to programming, and running into problems trying to apply a SQL statement:
My table ABCDdown3Minutes gets updated every minute with data through an API.
here's a shot of the table:
http://screencast.com/t/CdSWs9M3
as you can see I get multiple records with same [ticker] but with different [TimeOfEntry]
when new data comes into the table I have to find each [ticker] with the latest datestamp in [TimeOfEntry]
So this would call for a subquery using an Inner Join, correct?
this is what I've tried so far:
Set rsABCDd3min = db.OpenRecordset("Select t.* from ABCDdown3Minutes as t INNER Join (SELECT ticker, MAX(TimeOfEntry) LatestTimeOfEntry from ABCDdown3Minutes) as toe ON t.ticker = toe.ticker and t.TimeOfEntry = LatestTimeOfEntry WHERE t.[ticker] = ticker")
But I'm getting a "Join Expression not supported" error.
eventually (if I get this to work) I'd like to use a SQLstring in the openrecordset statement, since I have to do more filtering.
anyone any ideas? Much appreciated.