Would this workSELECT rt.propertyID, MAX(photoID), title, property_type, address1, address2, town, county, postcode, price, bedrooms, bathrooms, file_extension FROM #ResultsTable rtLEFT JOIN property_photo pp ON pp.propertyID = rt.propertyIDWHERE (row_num >= @row_start) AND (row_num <= @row_end)GROUP BY SELECT rt.propertyID, title, property_type, address1, address2, town, county, postcode, price, bedrooms, bathrooms, file_extension
AndyBeauty is in the eyes of the beerholder