Copy the identifiers, without the heading
Suppose you have product codes in Excel or Google Sheets and need to find the corresponding database records. Copy only the values in that column. Leave out the heading and any totals: the converter treats each nonblank line as a value, so a heading would become part of the list.
Before copying, check how the spreadsheet stores the codes. If it has already changed 00123 into 123, the missing zeros cannot be recovered by a converter. Store identifiers as text when their exact spelling matters.
Example input
00123
00456
O'BrienChoose SQL IN strings
Open the comma separator and SQL list builder, paste the column into Your list, and choose SQL IN strings under Output format. This mode supplies the parentheses and single quotes, and doubles apostrophes inside values. Custom wrapping simply adds characters; it does not provide SQL escaping.
Trim whitespace is useful when exported identifiers have accidental spaces around them. Turn it off if those spaces belong to the identifier. Remove duplicates is optional: repeated entries do not change which rows an IN condition matches.
Example result
('00123', '00456', 'O''Brien')Use the result in a SELECT query
Copy the result and put it after IN. This example assumes a Products table with a text ProductCode column; replace those names with the names in your database. The doubled apostrophe represents the single apostrophe in O'Brien.
Example result
SELECT ProductCode, ProductName
FROM Products
WHERE ProductCode IN ('00123', '00456', 'O''Brien');Check the data type and the matching rows
SQL IN strings produces text literals. If your database column is numeric, use an approach appropriate to that column instead of assuming text formatting preserves numeric identity. Check that the values and the returned rows are what you expect before using the condition in any data-changing query.
This is a formatting convenience for an ad hoc query. Application code should use parameterised queries instead of assembling SQL from user input. For a very large set, a staging table and join are often a more manageable workflow than a long pasted IN list.
Find identifiers that did not match
Export the returned ProductCode column and use Compare two lists. Put the original spreadsheet codes in List A and the returned codes in List B. Only in A identifies the codes that were not returned. Use the same whitespace and letter-case rules that fit your data; browser matching does not reproduce every database collation.
Need to clean the source first? Text cleanup can remove blank lines and duplicates while keeping the first occurrence of each identifier.