Turn a column of IDs into a quoted list for a query
A column copied from a spreadsheet becomes 'a', 'b', 'c' for the IN ( ) of a database query, without doubles or stray spaces.
The steps
- Take out the doubles. Each ID stays once. Remove duplicate lines
- Trim the spaces. Spaces before and after each ID go. Trim whitespace
- Add quotes and commas. Copy the list into your query. Add quotes and commas to list
A quoted, comma-separated list.