A
Accessor
Hi all. I'm about to throw in the towel on this subquery. I've checked it and
rechecked it. OK, as an overview, I have two tables, one of names of
industries (automotive, energy, etc) named tblIndustries. I have another
table of stock market company symbols, called tblSymbolsMain. This table has
an industry type as a field for each stock symbol. I've written a function
(that works great) called MultiDayPerfClose that returns a performance in
terms of percentage of a stock. What I'd like to do is get an average of
performance returns for each industry. I'm using 5 days for now. So for each
industry, I need the average performance based on the performance of all of
the stocks of that industry. When I run the query below, I get prompted with
a message box asking for "tblIndusties.Industry". I just click ok (I don't
enter a parameter) and the query runs without error but the return is totally
blank. Here's what I've got for a query:
SELECT tblIndustries.Industry, (SELECT Avg(Q1.DayPerformance) FROM (SELECT
tblSymbolsMain.Symbol, MultiDayPerfClose(tblSymbolsMain.[Symbol],5) AS
DayPerformance FROM tblSymbolsMain WHERE tblSymbolsMain.Industry =
tblIndustries.Industry) AS Q1) AS DayPerf
FROM tblIndustries;
Any help out there? Thanks in advance...
Kevin
rechecked it. OK, as an overview, I have two tables, one of names of
industries (automotive, energy, etc) named tblIndustries. I have another
table of stock market company symbols, called tblSymbolsMain. This table has
an industry type as a field for each stock symbol. I've written a function
(that works great) called MultiDayPerfClose that returns a performance in
terms of percentage of a stock. What I'd like to do is get an average of
performance returns for each industry. I'm using 5 days for now. So for each
industry, I need the average performance based on the performance of all of
the stocks of that industry. When I run the query below, I get prompted with
a message box asking for "tblIndusties.Industry". I just click ok (I don't
enter a parameter) and the query runs without error but the return is totally
blank. Here's what I've got for a query:
SELECT tblIndustries.Industry, (SELECT Avg(Q1.DayPerformance) FROM (SELECT
tblSymbolsMain.Symbol, MultiDayPerfClose(tblSymbolsMain.[Symbol],5) AS
DayPerformance FROM tblSymbolsMain WHERE tblSymbolsMain.Industry =
tblIndustries.Industry) AS Q1) AS DayPerf
FROM tblIndustries;
Any help out there? Thanks in advance...
Kevin