G
Guest
Hi,
SELECT
Count(RISK_TBL_OFFERSLOT.FLOORAMOUNT)/2 AS Hours,
Avg([CAPAMOUNT]*1000) AS [Price ($/MWh)],
Avg(Abs([KW])/1000) AS [Capacity (MW)]
FROM tbl_ElecContractsTemp LEFT JOIN RISK_TBL_OFFERSLOT
ON tbl_ElecContractsTemp.OfferCD = RISK_TBL_OFFERSLOT.OFFERCD
WHERE (((RISK_TBL_OFFERSLOT.VALIDTO)=0)
AND ((tbl_ElecContractsTemp.OfferCD) Is Not Null))
GROUP BY RISK_TBL_OFFERSLOT.OFFERCD;
The tbl_ElecContractsTemp is a local access table and RISK_TBL_OFFERSLOT is
remote linked table. With only one OfferCD in tbl_ElecContractsTemp I have
let the query run for 10 minutes before killing it. If I put the OfferCD into
the query it runs in about 7 seconds.
Thanks MarkS
SELECT
Count(RISK_TBL_OFFERSLOT.FLOORAMOUNT)/2 AS Hours,
Avg([CAPAMOUNT]*1000) AS [Price ($/MWh)],
Avg(Abs([KW])/1000) AS [Capacity (MW)]
FROM tbl_ElecContractsTemp LEFT JOIN RISK_TBL_OFFERSLOT
ON tbl_ElecContractsTemp.OfferCD = RISK_TBL_OFFERSLOT.OFFERCD
WHERE (((RISK_TBL_OFFERSLOT.VALIDTO)=0)
AND ((tbl_ElecContractsTemp.OfferCD) Is Not Null))
GROUP BY RISK_TBL_OFFERSLOT.OFFERCD;
The tbl_ElecContractsTemp is a local access table and RISK_TBL_OFFERSLOT is
remote linked table. With only one OfferCD in tbl_ElecContractsTemp I have
let the query run for 10 minutes before killing it. If I put the OfferCD into
the query it runs in about 7 seconds.
Thanks MarkS