Toad World® Forums

Sub-select in cross query

Is it possible to do a sub-select in a cross connection query? I built a cross query, and then went into the Query tab and added a sub-select statement, and it executed fine. But when I tried to save it I get the message saying “The diagram is not synchronized with the statement, please use Visualize Query button”. Once I do that, the sub-select statement gets deleted, and the SQL gets messed up.

So I’m thinking the diagram cannot handle the sub-select, but the query itself will run?

Yes, you should be able to use a query with a sub select. I would recommend that once you create the query the way you want it (including changing it in the Query tab), to open a Cross Connection Editor and save the query in there.

That said, Visualization of sub selects for cross query query builders should work. I was able to reproduce the issue and made issue QAT-7485 for this. Thank you for pointing this out to us!