Doesn't Power Query pick up Union Queries in Access?

Vaslo

Board Regular
Joined
Jun 3, 2009
Messages
159
I created a simple Union Query in Access, but when I refresh the "Source" it doesn't show up (and half the time all the queries disappear for no reason but come back after a dozen of so refreshes). When I try to manually type in the name of the query in the Navigation step, I get the "Key didn't match any rows in the table. Details: Key = Record Table = Table"

Is this another limitation of Power Query? Thanks!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi
I could not to view any an union query from my test Access database. Alright. I made a first trick. It was
Code:
Select id,fname,fvalue From
(Select id,fname,fvalue from table1
UNION Select id,fname,fvalue from table2) aunion;
But I got your error message "Key didn't match any rows in the table. Details: Key = Record Table = Table". Indeed, both table (table1 and table2) have id column as primary key. But that trick union query combines them together and it does not remove a definition of primary key from id column of the query.
Alright. Make another trick.
Code:
SELECT id1*1 AS id, fname, fvalue
FROM (Select id as id1,fname,fvalue from table1
UNION Select id as id1,fname,fvalue from table2)  AS aunion;
Make a id1 alias name for the id column of tables and in a select statement create a calculating column 1*id1 (let id column type is numeric).
It works fine.
Regards,
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,538
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top