This is my code but it is not returning proper results.
CalcServicePeriod query calculates each customer's SPStartDate and SPEndDate
NSLS table has DailyCons and DailyCost by Date
NSLS.Date is related to CalcServicePeriod.SPStartDate
I need the query to look at each customers SPStartDate and SPEndDate and pull the DailyCons and DialyCost for that date range and do the calculation for CustomerWAP.
SELECT CalcServicePeriod.ID, CalcServicePeriod.SPStartDate, CalcServicePeriod.SPEndDate, DSum(([DailyCons]/[DailyCost]),'NSLS',[Date] Between [SPStartDate] And [SPEndDate]) AS CustomerWAP
FROM NSLS INNER JOIN CalcServicePeriod ON NSLS.Date = CalcServicePeriod.SPStartDate;
I must be missing something, please help.
CalcServicePeriod query calculates each customer's SPStartDate and SPEndDate
NSLS table has DailyCons and DailyCost by Date
NSLS.Date is related to CalcServicePeriod.SPStartDate
I need the query to look at each customers SPStartDate and SPEndDate and pull the DailyCons and DialyCost for that date range and do the calculation for CustomerWAP.
SELECT CalcServicePeriod.ID, CalcServicePeriod.SPStartDate, CalcServicePeriod.SPEndDate, DSum(([DailyCons]/[DailyCost]),'NSLS',[Date] Between [SPStartDate] And [SPEndDate]) AS CustomerWAP
FROM NSLS INNER JOIN CalcServicePeriod ON NSLS.Date = CalcServicePeriod.SPStartDate;
I must be missing something, please help.