Generate SQL code to retrieve disabled records with matching custom names