janewilliams20: (geek)
[personal profile] janewilliams20
When you're doing a UNION in a ColdFusion Query of Queries, that's when. I've met some interesting idiosyncracies in there before, but this is a new one on me.

I'm doing a series of CFQUERIES on a MySQL DB that all return the same column names, then using cfquery dbtype="query" to UNION the lot.
The problem is that one table has a column defined as INT(11) signed, and the others are INT(10) unsigned. I can compare the two in MySQL, no problem. But when I try to do the UNION, I'm told that I can't compare a BIGINT with a normal INTEGER.
So, I tried to CAST the odd one out to match the others. Now I'm told I can't compare an INTEGER with... a Java object???

I'm casting all those integers as unsigned integer (which most of them were to start with). The UNION now works.

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

janewilliams20: (Default)
janewilliams20

June 2020

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 6th, 2025 04:34 pm
Powered by Dreamwidth Studios