Is it possible to use a bitAnd() condition in coldfusion QoQ SQL?
I have checked adobe’s documentation on QoQ (http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec0e4fd-7ff0.html). It doesn’t say anything about bitwise functions, but past experiences tell me that the coldfusion documentation isn’t always complete.
Qoq SQL:
SELECT *
FROM srcTable
WHERE bitAnd(member_type_bit,2) = 2
This throws the error:
Query Of Queries syntax error. Encountered “bitAnd ( member_type_bit
,. Incorrect conditional expression, Expected one of
[like|null|between|in|comparison] condition,
Is it just not supported in QoQ or do I need to use a different syntax?
No, there’s no bitAnd() function in the SQL dialect that QoQ uses.
You’ll need to do it row by row, ie: loop over the recordset, and build a new recordset with only the rows you want. Or push this back to the DB and do it there (if poss).
For future reference, the entirety of what QoQ supports is listed here:
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec0e4fd-7ff0.html
That’s all of it.