I have some Ruby script for you today.  It takes a parameterised SQL statement and converts it back to a form you can dump into your SQL console/administrator/console and run.

While the logic of the script is reasonably solid, you may need to tweak it slightly depending on the number of spaces/brackets/commas/etc in your sql statements.
Continue Reading »