Just a heads up on a problem I have come across that just had me head scratching for a while.
I had a query that was creating a temp table and then using the table later on in the same statement. This was working fine in our development environment, but then fell over when it went to test. As this is perfectly valid SQL it had me thinking hard for a while.
What the problem turned out to be was the JDBC driver in CF. We had upgraded the JDBC driver to DataDirect 3.5. What we found is that this driver has an aversion to running CREATE's and INSERTS in the same statement, whereas SQL Server itself and the DataDirect 3.3 drivers don't mind one little bit.
The solution? Well, we migrated that DSN to an ODBC socket as we have other code that broke on 3.3, but you could either downgrade back to 3.3 or see if you can upgrade further.

