# Union in Powerpivot



## ellenl5974 (Jan 30, 2012)

I am trying to join two tables with a UNION ALL statement in the Query Editor.  

One of the tables is an external csv file link, and the other resides in the workbook where I am conducting the PowerPivot.  

I am write the SQL query to access the external table, but it does not seem to recognize the table within the same workbook.  What am I doing wrong?

Thanks,
Ellen


----------



## powerpivotpro (Jan 30, 2012)

I've never done what you are doing so it's hard for me to help.  Are you able to succeed with this when the second table is in *another* workbook (one that is NOT open) rather than the one you are currently using?  I wonder if the fact that the current workbook is "open for read/write" is the problem or if it's something else.


----------



## ellenl5974 (Jan 30, 2012)

Thanks for the reply, Rob.  That may be it.  I can do it if it is in a separate sheet, but I am trying to reduce the number of places where the user inputs information.  

Would love to find a solution.


----------



## powerpivotpro (Jan 30, 2012)

Sounds like "open for read/write" is indeed the problem.  I don't think there's a workaround for that, you will have to find a way to make it acceptable for the second source to be outside the current workbook.


----------

