Hello,
I am hoping someone can assist me here. I have searched on the web and cant seem to find what the actual issue is. I have the following select statement:
SELECT DISTINCTROW TOP 1 tblElectronicBilling.[PRIMARY FILE NAME], tblElectronicBilling.[Assigned To], tblElectronicBilling.[Assigned Date], tblElectronicBilling.File_Receipt_Date, tblElectronicBilling.File_Load_Date, tblElectronicBilling.File_Completion_Date, tblElectronicBilling.Import_Date
FROM tblElectronicBilling
WHERE (((tblElectronicBilling.[PRIMARY FILE NAME]) Is Not Null) AND ((tblElectronicBilling.[Assigned To]) Is Null) AND ((tblElectronicBilling.File_Receipt_Date) Is Not Null) AND ((tblElectronicBilling.File_Completion_Date) Is Null))
ORDER BY tblElectronicBilling.File_Load_Date;
I am aware some fields are not normalized this was not my design. So what I have created is a query that returns 1 record from the table. I have a button on the form so the user can assign themselves work. I want it sorted by the oldest File_Load_Date. My issue is when I put an ASC sort on that field I get 22 records even tho I have it setup to return 1. I take the sort off and I get my expected result but the File_Load_Date does not return the oldest date.
Any assistance is appreciated!!
I am hoping someone can assist me here. I have searched on the web and cant seem to find what the actual issue is. I have the following select statement:
SELECT DISTINCTROW TOP 1 tblElectronicBilling.[PRIMARY FILE NAME], tblElectronicBilling.[Assigned To], tblElectronicBilling.[Assigned Date], tblElectronicBilling.File_Receipt_Date, tblElectronicBilling.File_Load_Date, tblElectronicBilling.File_Completion_Date, tblElectronicBilling.Import_Date
FROM tblElectronicBilling
WHERE (((tblElectronicBilling.[PRIMARY FILE NAME]) Is Not Null) AND ((tblElectronicBilling.[Assigned To]) Is Null) AND ((tblElectronicBilling.File_Receipt_Date) Is Not Null) AND ((tblElectronicBilling.File_Completion_Date) Is Null))
ORDER BY tblElectronicBilling.File_Load_Date;
I am aware some fields are not normalized this was not my design. So what I have created is a query that returns 1 record from the table. I have a button on the form so the user can assign themselves work. I want it sorted by the oldest File_Load_Date. My issue is when I put an ASC sort on that field I get 22 records even tho I have it setup to return 1. I take the sort off and I get my expected result but the File_Load_Date does not return the oldest date.
Any assistance is appreciated!!