The reason that you're getting an error is because the column DonorID
appears in both of your tables, so the SQL engine doesn't know which value to display in the SELECT
list, or which value to filter on in the WHERE
clause.
The best practice, both to avoid this error and for readability, is to alias your table names and then apply those table aliases to every column name that appears anywhere in your query. It removes ambiguity for the SQL engine at run time, for you when you have to troubleshoot the query, for your buddy who has to cover the on-call rotation when it isn't you, and for the person who takes over your job when you move on.
As to your JOIN
syntax, I strongly prefer the ANSI-92 explicit joins, but, oddly, there's still a religious war raging. Have a look at this pretty old post for arguments on both sides.