About SQLPatch β IDs/List to SQL Generator
Turning a spreadsheet column of IDs into a properly formatted SQL IN clause, or a two-column list of IDs and new values into a bulk update, is exactly the kind of task that’s simple in principle but genuinely tedious and error-prone to do by hand once the list runs past a handful of rows.
A worked example: pasting the three lines 1,Alice, 2,Bob, 3,Carol in Bulk UPDATE mode generates a complete, ready-to-run statement:
UPDATE users
SET name = CASE id
WHEN 1 THEN 'Alice'
WHEN 2 THEN 'Bob'
WHEN 3 THEN 'Carol'
END
WHERE id IN (1, 2, 3);
Every value is properly escaped before being inserted β a name like O'Brien becomes 'O''Brien' in the output, the standard SQL convention for a literal quote inside a string, identical across MySQL, PostgreSQL, and SQL Server. This was verified specifically against real injection patterns before shipping, not just normal input β a value like Robert'; DROP TABLE users; -- gets fully neutralized into an inert string rather than becoming executable SQL, confirmed by simulating exactly how a real SQL parser reads the escaped output back.
Numbers and text are told apart automatically by default β a column of plain digits generates unquoted numeric values, while anything else is quoted and escaped as text. This can be overridden to always treat values as text, useful for something like a ZIP code with a leading zero that would otherwise be misread as a number.
