• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

QoQ Help!!!

Participant ,
Jan 12, 2010 Jan 12, 2010

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) )

TOPICS
Advanced techniques

Views

684

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2010 Jan 12, 2010

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2010 Jan 12, 2010

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2010 Jan 12, 2010

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 13, 2010 Jan 13, 2010

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) ) )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jan 13, 2010 Jan 13, 2010

Copy link to clipboard

Copied

LATEST

valuelist doesnt work either...

Yes, it does. It is supposed to replace the unsupported subquery (with SELECT)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation