Toad World® Forums

Query Builder and Subquery

In querybuilder, I added a subquery. The subquery is joined with one table. I select 3 cols from the table and 6 cols from subquery

I execute the full query, it runs fine.

I add a WHERE clause on a subquery field in the main query. I run the query, no issues.

I click on SUBQUERY to edit the subquery where I SELECT additional cols and a WHERE clause. I run the subquery to see the results, no issues.

I return to the main query, and all the cols I selected from SUBQUERY are gone!

Any thoughts?

If you only added columns in the subquery then there should not be any changes in the main query except the new columns have to be added.

If you unselect /select back columns then the subquery in the main query will be changed and the main query will be changed.

This happens because changing previously selected columns in a subquery causes us to remove the columns from the subquery of the main query and put them back as new columns.

Regards

Aleksey