1) Asking questions doesn't make you a pest
, specially, when it is clear, that you are trying.
2) There are n number of guys / gals here who are far far better than me. So avoid specific address. It might perhaps put off some from answering.
3) Have lost touch, with the functionality of what we were doing. If you post some data, the way you have done earlier, it would be easier for some one to help.
Edit :
Alternatively, check out if below gives some guidelines :
Code:
SELECT
qrySpreadsA.ThePeriod,
qrySpreadsA.HY,
qrySpreadsA.Yields,
qrySpreadsA.Spreads,
qryAverageSpreadsA.AvgOfSpreads,
[AvgOfSpreads]-[Spreads] AS TheDifference
FROM
(
SELECT
tbl_H0A0_monthly.ThePeriod,
tbl_H0A0_monthly.px_last AS HY,
tbl_10YR_monthly.px_last AS Yields,
[HY]-[Yields] AS Spreads
FROM
tbl_H0A0_monthly
INNER JOIN
tbl_10YR_monthly
ON
tbl_H0A0_monthly.ThePeriod = tbl_10YR_monthly.ThePeriod
)
AS qrySpreadsA,
(
SELECT
Avg([tbl_H0A0_monthly.px_last]-[tbl_10YR_monthly.px_last]) AS AvgOfSpreads
FROM
tbl_H0A0_monthly
INNER JOIN
tbl_10YR_monthly
ON
tbl_H0A0_monthly.ThePeriod = tbl_10YR_monthly.ThePeriod
)
AS qryAverageSpreadsA;
I have marked the thread as unsolved to get a wider coverage.
Thanks