Column 'hotelid' does not belong to table select distinct [hotel id] as hotelid,establishmentname as displayname from COUK_hotels left JOIN dbo.COUK_users ON dbo.COUK_hotels.userid = dbo.COUK_users.internalid WHERE postcode LIKE @postcode AND (Status = 'L' OR Status = 'B' OR (Status = 'C' AND credits > 0) OR (Status = 'O')) ORDER BY establishmentname.