Inner Join Issue with spark.sql

The reason is, the database engine doesn't know which table you're refering to, as the field BusinessEntityID is in both tables.

Try changing this:

ON BusinessEntityID = BusinessEntityID

to this:

ON Person_Password.BusinessEntityID = Person_Person.BusinessEntityID
1 Like