Wrong relation between the tables and the queries

%3CLINGO-SUB%20id%3D%22lingo-sub-3519100%22%20slang%3D%22ja-JP%22%3ERe%3A%20Wrong%20relation%20between%20the%20tables%20and%20the%20queries%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3519100%22%20slang%3D%22ja-JP%22%3E%3CP%3EI%20did%20additional%20test%20on%20the%20table%20%22a_tbl%22%2C%20and%20found%20something%20strange.%3CBR%20%2F%3E%3CBR%20%2F%3E%20When%20I%20press%20%22Query%22%20ribbon%20button%20and%20press%20%22Edit%22%2C%20the%20query%20%22%20%3CSTRONG%3Ea_query%22%3C%2FSTRONG%3E%20appears.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Taichi2220_0-1655432720118.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_0-1655432720118.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_0-1655432720118.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_0-1655432720118.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_0-1655432720118.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_0-1655432720118.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_0-1655432720118.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_0-1655432720118.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F381177i4CD8592DE597EAC3%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Taichi2220_0-1655432720118.png%22%20alt%3D%22Taichi2220_0-1655432720118.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EHowever%20when%20I%20right%20click%20on%20the%20%22a_tbl%22%20and%20select%20%22table%22%20-%26gt%3B%20%22Edit%20query%22%2C%20the%20query%20%22%20%3CSTRONG%3Eb_query%22%3C%2FSTRONG%3E%20appears!%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Taichi2220_1-1655433402849.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_1-1655433402849.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_1-1655433402849.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_1-1655433402849.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_1-1655433402849.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_1-1655433402849.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_1-1655433402849.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_1-1655433402849.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F381179i2E0DC82DC46F4F5E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Taichi2220_1-1655433402849.png%22%20alt%3D%22Taichi2220_1-1655433402849.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EWhy%20is%20the%20appearing%20query%20different%20when%20taking%20a%20different%20route%20to%20show%20the%20query%20edit%20screen%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3519060%22%20slang%3D%22ja-JP%22%3ERe%3A%20Wrong%20relation%20between%20the%20tables%20and%20the%20queries%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3519060%22%20slang%3D%22ja-JP%22%3E%3CP%3Edeleted%20(edited%20the%20original%20post)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3519004%22%20slang%3D%22ja-JP%22%3EWrong%20relation%20between%20the%20tables%20and%20the%20queries%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3519004%22%20slang%3D%22ja-JP%22%3E%3CH3%20id%3D%22toc-hId--1322702133%22%20id%3D%22toc-hId--1322702106%22%3ESituation%3C%2FH3%3E%3CP%3EI%20have%20an%20Excel%20file%20%22table_query_strangeness_20220617.xlsx%22%20with%20two%20sheets%20%22a%22%20and%20%22b%22.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThe%20sheet%20%22a%22%20has%20a%20table%20%22a_tbl%22.%3C%2FP%3E%3CP%3EThe%20sheet%20%22b%22%20has%20a%20table%20%22b_tbl%22.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Taichi2220_2-1655429867366.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_2-1655429867366.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F381169i425B7FAFBFDC932C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Taichi2220_2-1655429867366.png%22%20alt%3D%22Taichi2220_2-1655429867366.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Taichi2220_3-1655429898070.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_3-1655429898070.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F381170iEF198D9949B738A2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Taichi2220_3-1655429898070.png%22%20alt%3D%22Taichi2220_3-1655429898070.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20also%20have%20two%20query%20%22a_query%22%20and%20%22b_query%22.%3C%2FP%3E%3CP%3EWhen%20I%20select%20the%20query%20%22a_query%22%20in%20the%20%22Queries%20%26amp%3B%20Connciton%22%2C%20the%20table%20%22a_tbl%22%20on%20the%20worksheet%20is%20selected.%3C%2FP%3E%3CP%3EWhen%20I%20select%20the%20query%20%22b_query%22%20in%20the%20%22Queries%20%26amp%3B%20Connciton%22%2C%20the%20table%20%22b_tbl%22%20on%20the%20worksheet%20is%20selected.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Taichi2220_4-1655430008386.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_4-1655430008386.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F381171i67FE5C0F0037C7EB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Taichi2220_4-1655430008386.png%22%20alt%3D%22Taichi2220_4-1655430008386.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Taichi2220_5-1655430023504.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_5-1655430023504.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F381172i28427BCAE8EF2DF1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Taichi2220_5-1655430023504.png%22%20alt%3D%22Taichi2220_5-1655430023504.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EEverything%20so%20far%20seems%20OK.%3CBR%20%2F%3E%20However%2C%20strange%20thing%20happen%20when%20I%20I%20see%20the%20query%20property.%3C%2FP%3E%3CP%3EWhen%20I%20see%20the%20query%20property%20of%20%22a_query%22%2C%20where%20the%20query%20is%20used%20is%20%3CSTRONG%3Esheet%20%22b%22%2C%20%22b_tbl%22%3C%2FSTRONG%3E%20!%3CBR%20%2F%3E%20When%20I%20see%20the%20query%20property%20of%20%22b_query%22%2C%20where%20the%20query%20is%20used%20is%20%3CSTRONG%3Esheet%20%22a%22%2C%20%22a_tbl%22%3C%2FSTRONG%3E%20!%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Taichi2220_7-1655430270048.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_7-1655430270048.png%22%20style%3D%22width%3A%20354px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F381174i14D19ACEBEB466AF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Taichi2220_7-1655430270048.png%22%20alt%3D%22Taichi2220_7-1655430270048.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Taichi2220_6-1655430243937.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_6-1655430243937.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F381173i762C40D93CA57272%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Taichi2220_6-1655430243937.png%22%20alt%3D%22Taichi2220_6-1655430243937.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EActually%2C%20this%20table%20and%20query%20were%20OK%20when%20I%20made%20this%20file.%20The%20table%20%22a_tbl%22%20was%20using%20%22a_query%22%2C%26nbsp%3B%20and%20the%20%22b_tbl%22%20was%20using%20%22b_queyr%22.%3CBR%20%2F%3E%20I%20had%20no%20trouble%20updating%20the%20query%20and%20it%20was%20updating%20the%20correct%20table.%20(The%20query%20is%20reading%20CSV%20file%20in%20my%20local%20computer.)%3CBR%20%2F%3E%20But%20from%20yesterday%2C%20suddenly%20the%26nbsp%3Btable%20%22a_tbl%22%20is%20using%20%22b_query%22%2C%20and%26nbsp%3B%20%22b_tbl%22%20is%20using%20%22a_query%22.%3CBR%20%2F%3E%20When%20I%20update%20the%20queries%2C%20now%20the%20information%20of%20A%20appears%20in%20%22b_tbl%22%2C%20and%20the%20information%20of%20B%20appears%20in%20%22a_tbl%22.%3C%2FP%3E%3CH3%20id%3D%22toc-hId-1164810700%22%20id%3D%22toc-hId-1164810727%22%3EQuestion%3C%2FH3%3E%3COL%3E%3CLI%3EIf%20%22a_tbl%22%20is%20using%20%22b_query%22%20as%20shown%20in%20the%20query%20property%20screen%2C%20why%20is%20%22a_tbl%22%20selected%20in%20the%20worksheet%20when%20I%20press%26nbsp%3B%22a_query%22%20in%20the%20query%20pane%3F%3C%2FLI%3E%3CLI%3EHow%20can%20I%20fix%20the%20relation%20between%20the%20table%20and%20the%20query%3F%3CBR%20%2F%3E%20I%20guess%20I%20can%20re-generate%20the%20tables%20and%20queries%2C%20but%20I%20would%20like%20to%20know%20if%20there%20is%20an%20easy%20way.%3C%2FLI%3E%3C%2FOL%3E%3CH3%20id%3D%22toc-hId--642643763%22%20id%3D%22toc-hId--642643736%22%3ESituation%20(Additional)%3C%2FH3%3E%3CP%3EI%20did%20additional%20test%20on%20the%20table%20%22a_tbl%22%2C%20and%20found%20something%20strange.%3CBR%20%2F%3E%3CBR%20%2F%3E%20When%20I%20press%20%22Query%22%20ribbon%20button%20and%20press%20%22Edit%22%2C%20the%20query%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%22%3CSTRONG%3Ea_query%22%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eappears.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Taichi2220_2-1655971010009.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_2-1655971010009.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F382939iB668A031BF59ABE4%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Taichi2220_2-1655971010009.png%22%20alt%3D%22Taichi2220_2-1655971010009.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%20when%20I%20right%20click%20on%20the%20%22a_tbl%22%20and%20select%20%22table%22%20-%26gt%3B%20%22Edit%20query%22%2C%20the%20query%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%22b_query%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%20appears!%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Taichi2220_3-1655971037763.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Taichi2220_3-1655971037763.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F382940iB74E15DEA3EA068B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Taichi2220_3-1655971037763.png%22%20alt%3D%22Taichi2220_3-1655971037763.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhy%20is%20the%20appearing%20query%20different%20when%20taking%20a%20different%20route%20to%20show%20the%20query%20edit%20screen%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3519004%22%20slang%3D%22ja-JP%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

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".

Taichi2220_2-1655429867366.png

Taichi2220_3-1655429898070.png

 

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.

Taichi2220_4-1655430008386.png

Taichi2220_5-1655430023504.png

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" !
Taichi2220_7-1655430270048.png

Taichi2220_6-1655430243937.png


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.

Taichi2220_2-1655971010009.png

 

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

Taichi2220_3-1655971037763.png

 

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

0 Replies