Quote:
Originally Posted by ineedahelp
When I run a "without matching" query on DailyPrice and DATAFILE_111306, I get a list of 300+ instances. I thought that the query below would give me ALL records in DATAFILE even if there were no corresponding records in DailyPrice. In fact, none of the names on the without matching query ended up on the list created from the query below. Any help with why this is happening?
SELECT DISTINCT DailyPrice.Symbol, DailyPrice.LocateDate, DailyPrice.MarketPrice
FROM DailyPrice RIGHT JOIN DATAFILE_111306 ON DailyPrice.Symbol = DATAFILE_111306.Symbol
WHERE (((DailyPrice.LocateDate) Between Now() And (Now()-8)))
ORDER BY DailyPrice.Symbol, DailyPrice.LocateDate DESC;
You've taken all your fields from the left side DailyPrice. The query isn't returning any data from DATAFILE_111306 so there is nothing to show.
Try this:
SELECT DATAFILE_111306.Symbol, DailyPrice.LocateDate, DailyPrice.MarketPrice
FROM DailyPrice RIGHT JOIN DATAFILE_111306 ON DailyPrice.Symbol = DATAFILE_111306.Symbol
WHERE (((DailyPrice.LocateDate) Between Now() And (Now()-8)))
ORDER BY DATAFILE_111306.Symbol, DailyPrice.LocateDate DESC;