I am taking a query from a database, using two tables and am getting the error described in the title of my question. In some cases, the field I need to query by is in table A,
When you assemble your select1 variable, add the tablenames or aliases. In other words, instead of resembling this:
select1 = "fred,barney,wilma,pebbles";
Make it resemble this:
select1 = "a.fred,a.barney,b.wilma,b.pebbles";