Hello I need to return the first result for each Prop_ID in a query.
The query below returns all records (i.e. a number of records for each ID)
I have tried a few efforts, but seem to just end up with a single record as opposed to a single record for each ID.
Many thanks Mark
The query below returns all records (i.e. a number of records for each ID)
Code:
SELECT mqry_tbl_Property.Prop_ID, mqry_tbl_Property.Prop_Address_Sort, mqry_tbl_Filestore.FileStore_Date_Added, mqry_tbl_Filestore.FileStore_Target_Path, mqry_tbl_Filestore.FileStore_TblSup_ID_Link
FROM mqry_tbl_Property LEFT JOIN mqry_tbl_Filestore ON mqry_tbl_Property.Prop_ID = mqry_tbl_Filestore.FileStore_Property_ID_Link
GROUP BY mqry_tbl_Property.Prop_ID, mqry_tbl_Property.Prop_Address_Sort, mqry_tbl_Filestore.FileStore_Date_Added, mqry_tbl_Filestore.FileStore_Target_Path, mqry_tbl_Filestore.FileStore_TblSup_ID_Link
HAVING (((mqry_tbl_Filestore.FileStore_TblSup_ID_Link)=26))
ORDER BY mqry_tbl_Property.Prop_ID, mqry_tbl_Filestore.FileStore_Date_Added DESC;
I have tried a few efforts, but seem to just end up with a single record as opposed to a single record for each ID.
Many thanks Mark