Thanks to Tim for reminding me what a headache this can be!
I’m guilty of creating SQL statements like so:
SELECT testfield FROM sometable
Today that caused a real problem. An error that was incredibly difficult to find.
The error message was:
11 >= 11 null
Seriously, that was the error message displayed by Coldfusion.
The answer was that we should’ve qualified the table name like so:
SELECT testfield FROM [sometable]
You can take it a step further and do this for your columns as well. I usually do not qualify my column names unless it’s necessary, but qualifying your table name is easy and may save your hair.
An information technology professional with twenty five years experience in systems administration, computer programming, requirements gathering, customer service, and technical support.
0 Comments