Forum Discussion

Taichi2220's avatar
Taichi2220
Copper Contributor
Jun 17, 2022

Wrong relation between the tables and the queries

Situation

I have an Excel file "table_query_strangeness_20220617.xlsx" with two sheets "a" and "b".


The sheet "a" has a table "a_tbl".

The sheet "b" has a table "b_tbl".

 

I also have two query "a_query" and "b_query".

When I select the query "a_query" in the "Queries & Connciton", the table "a_tbl" on the worksheet is selected.

When I select the query "b_query" in the "Queries & Connciton", the table "b_tbl" on the worksheet is selected.

Everything so far seems OK.
However, strange thing happen when I I see the query property.

When I see the query property of "a_query", where the query is used is sheet "b", "b_tbl" !
When I see the query property of "b_query", where the query is used is sheet "a", "a_tbl" !


Actually, this table and query were OK when I made this file. The table "a_tbl" was using "a_query",  and the "b_tbl" was using "b_queyr".
I had no trouble updating the query and it was updating the correct table.(The query is reading CSV file in my local computer.)
But from yesterday, suddenly the table "a_tbl" is using "b_query", and  "b_tbl" is using "a_query".
When I update the queries, now the information of A appears in "b_tbl", and the information of B appears in "a_tbl".

Question

  1. If "a_tbl" is using "b_query" as shown in the query property screen, why is "a_tbl" selected in the worksheet when I press "a_query" in the query pane?
  2. How can I fix the relation between the table and the query?
    I guess I can re-generate the tables and queries, but I would like to know if there is an easy way.

Situation (Additional)

I did additional test on the table "a_tbl", and found something strange.

When I press "Query(クエリ)" ribbon button and press "Edit(編集)", the query "a_query" appears.

 

However when I right click on the "a_tbl" and select "table(テーブル)"->"Edit query(クエリの編集)"、 the query "b_query" appears !

 

Why is the appearing query different when taking a different route to show the query edit screen ?

No RepliesBe the first to reply