cbase
IS-IT--Management
- Jun 21, 2003
- 14
Hi guys,
I am hoping someone can point me in the right direction with this problem.
Query:
SELECT AudMainOrders.Date, AudMainOrders.EnquiryNumber, [OrderNumber] & " " & [OrderNumLetter] AS OrderNo, AudMainOrders.Consultant, AudMainOrders!Hours*AudMainOrders!Rate+AudMainOrders!Days*AudMainOrders!Rate+AudMainOrders!PVB*AudMainOrders!Rate+AudMainOrders!EWS+AudMainOrders!EwsExp AS CommitedTotal
FROM AudMainOrders
GROUP BY AudMainOrders.Date, AudMainOrders.EnquiryNumber, [OrderNumber] & " " & [OrderNumLetter], AudMainOrders.Consultant, AudMainOrders!Hours*AudMainOrders!Rate+AudMainOrders!Days*AudMainOrders!Rate+AudMainOrders!PVB*AudMainOrders!Rate+AudMainOrders!EWS+AudMainOrders!EwsExp
HAVING (((AudMainOrders.Date) Between [Start Date] And [End Date]))
ORDER BY AudMainOrders.EnquiryNumber;
I have listed the sql as far as I can get, now I need to limit the results to those where a change is detected between the committed total field.
That is, most of the results will have only one entry, these are to be disregarded the unique identifier (semi) will be the EnquiryNumber.
If an Enquiry Number appears more than once then if the difference is in the Committed Total Then list.
Appreciate all of your help
Diverdon
I am hoping someone can point me in the right direction with this problem.
Query:
SELECT AudMainOrders.Date, AudMainOrders.EnquiryNumber, [OrderNumber] & " " & [OrderNumLetter] AS OrderNo, AudMainOrders.Consultant, AudMainOrders!Hours*AudMainOrders!Rate+AudMainOrders!Days*AudMainOrders!Rate+AudMainOrders!PVB*AudMainOrders!Rate+AudMainOrders!EWS+AudMainOrders!EwsExp AS CommitedTotal
FROM AudMainOrders
GROUP BY AudMainOrders.Date, AudMainOrders.EnquiryNumber, [OrderNumber] & " " & [OrderNumLetter], AudMainOrders.Consultant, AudMainOrders!Hours*AudMainOrders!Rate+AudMainOrders!Days*AudMainOrders!Rate+AudMainOrders!PVB*AudMainOrders!Rate+AudMainOrders!EWS+AudMainOrders!EwsExp
HAVING (((AudMainOrders.Date) Between [Start Date] And [End Date]))
ORDER BY AudMainOrders.EnquiryNumber;
I have listed the sql as far as I can get, now I need to limit the results to those where a change is detected between the committed total field.
That is, most of the results will have only one entry, these are to be disregarded the unique identifier (semi) will be the EnquiryNumber.
If an Enquiry Number appears more than once then if the difference is in the Committed Total Then list.
Appreciate all of your help
Diverdon