Fix apostrophe in list and items for SQL query