With the word distinct the actual 4 fields returned cannot be duplicated. I would susect that there might be multiple rows of comments Please show us sample results and dscribed how these look like duplicates to you.
Do you want a sum of all rows returned or a sum for each subgroup (based on which fields?
Please add the responses to this page.
Phil, I ran a query for one bill on each of the files used in the query. I ran the main query on the same bill. Below are the results:
CADJ File (Amount Field) For this Bill 209004
209004 R -1586.88
209004 R -10.00
209004 C 831.17
209004 R -831.17
CRDC File (Comment Field) For this Bill 209004
SPLIT TO CONDOS PER SURVEY AG 209004 1586.88 0.00
SPLIT TO CONDOS PER SURVEY 209004 0.00 0.00
SPLIT TO CONDOS PER SURVEY 209004 0.00 831.17
PUT ON WRONG PARCEL 209004 831.17 0.00
CPRP File (Taxpayer ID)
GNAM File (Taxpayer Name)
391514 SLEEPY HOLLOW
Current Query Results using this one bill number:
SLEEPY HOLLOW GREEN -10.00 SPLIT TO CONDOS PER SURVEY AG
SLEEPY HOLLOW GREEN -10.00 SPLIT TO CONDOS PER SURVEY SLEEPY HOLLOW GREEN -10.00 PUT ON WRONG PARCEL SLEEPY HOLLOW GREEN 831.17 SPLIT TO CONDOS PER SURVEY AG SLEEPY HOLLOW GREEN 831.17 SPLIT TO CONDOS PER SURVEY
SLEEPY HOLLOW GREEN 831.17 PUT ON WRONG PARCEL
Desired Result (Total that amount field in the CADJ File)
SLEEPY HOLLOW GREEN 1596.88 SPLIT CONDOS PER SURVEY (GRAB THE LAST COMMENT ENTERED?)