Automating prep work for SQL in list query of hundreds-thousands of items

sql in list

SQL in List

Often I have a list of hundreds (sometimes thousands) of items that I need to insert into a  query. Unfortunately I can only add 99 items at a time.

This video demonstrates how my script replaces the first 98 line breaks with commas and wrap items already having a comma with special characters to escape them.    This is perfect for my SQL in list query!  What would have taken me several minutes or longer is now done in the blink of an eye  (while also escaping illegal characters).  The below video demonstrates it’s usage and further down the page is the AutoHotkey code that cranks it out!


Video demonstrating how the SQL in list works

Comma delimited list for SQL query




Save a ton of time by creating a syntax writer that writes your code for you!

AutoHotKey syntax writer

Syntax Writer

While fun, writing code can be very tedious in that it needs to be in a specific format. I use hotstrings to replace words I frequently use but what I also realized is I often have to put parameters into specific format like a quote encapsulated/comma delimited list.

This video shows how I wrote some very simple code that makes it much easier for me to be more productive in my SQL code writing.  I have other syntax writers for other languages but the concept stays the same.


Programs that help you write programs