Copy link to clipboard
Copied
Query Of Queries syntax error.
Encountered "event_number in ( select. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition,
Output SQL
select * from SearchRes0 where event_number in ( select distinct p.event_number from ops$new.ne_node n , ops$new.ne_problem p , ops$new.ne_lob l where 1 = 1 and p.event_number = n.event_number and p.event_number = l.event_number And p.problem_code in (30,40) )
Copy link to clipboard
Copied
Whilst the QoQ docs (http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec0e4fd-7ff0.html#WSc3ff6d0ea77859461172e0811cbec0e4fd-7fda) claim one can have a sub-query within an IN() expression, I don't think this is true. I'm 95% certain QoQ does not allow sub-queries at all.
I need to go jump on a train, but I'll look further into this once/if I find a seat...
--
Adam
Message was edited by: A Cameron
Copy link to clipboard
Copied
No seats on the train tonight 😞
However I've just knocked together some code to test whether QoQ supports subqueries in an IN() statement, and - no - they do not.
So that's your problem.
--
Adam
Copy link to clipboard
Copied
But you can have as many Q of Q's as you want and you can use in (#valuelist(somequery)#) instead of a subquery.
Copy link to clipboard
Copied
valuelist doesnt work either...
Query Of Queries syntax error.
Encountered "event_number in ( valuelist (. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition,
----
select * from SearchRes0 where event_number in ( valuelist( select distinct p.event_number from ops$new.ne_node n , ops$new.ne_problem p , ops$new.ne_lob l where 1 = 1 and p.event_number = n.event_number and p.event_number = l.event_number And p.problem_code in (10) ) )
Copy link to clipboard
Copied
valuelist doesnt work either...
Yes, it does. It is supposed to replace the unsupported subquery (with SELECT)