Archive for April, 2009

Yes, that is the interestingly ambiguous message I recieved today while developing on a particularly large CFC. In this particular component there was a function that was excessively long, so I decided to be cool and break it apart a little bit. To start I took out a 523 line query and moved it to [...]

SQL Formatted Revisited

Posted: 8th April 2009 by Adam Presley in Development, Regex
Tags: ,

I posted an entry yesterday about using a regular expression to reformat SQL queries in code. After a bit more exploring and playing around in RegexBuddy (wonderful tool) I came up with a better regular expression to do the job. This version accounts for the last column much better than the previous expression I tried. [...]

If you’ve worked with a lot of inline SQL like I have over the years you’ve probably discovered quickly that as you have to add more columns to your query, especially columns that are only added on a dynamic condition, it can be easy to mangle up your commas. Here’s an example of a common [...]