Here's one way:SELECT prop.id,prop.datesubmitted ,cust.forename,cust.surname ,cust.tradingname,prop.quoteterms ,prop.customerref ,v.vehicleFROM tblProposals prop LEFT JOIN tblCustomers cust ON prop.customerID = cust.ID outer apply ( select top 1 v.vehicle from tblVehicles v where v.propid = prop.propid order by v.vehicle ) vWHERE prop.proposalstatus=2 AND prop.userid='test@test.com' AND (prop.customerref LIKE '%qash%' OR prop.id LIKE '%qash%' OR v.vehicle LIKE '%qash%')
Be One with the OptimizerTG