This usually means your SQL statement is joining on more than one table, and doesn't know which column you're trying to retrieve. For example:
SELECT column1 FROM table1 JOIN table2 ON table1.column1 = table2.column1 |
To fix this, you'll want to butter up the statement a bit:
SELECT column1 = t1.column1 FROM table1 t1 JOIN table2 t2 ON t1.column1 = t2.column1 |
The changes:
- Used an alias for the column name, so that external code continues to work when referencing "column1"
- Added the prefix "t1" to the requested column, so that the engine knows which table we want the data from
- Added table aliases in the FROM / JOIN clauses to shorten the code