I get an Ambiguous column name error with this query (InvoiceID). I can\'t figure out why. They all seem to be joined correctly so why doesn\'t the management studio know to
if you join 2 or more tables and they have similar names for their columns sql server wants you to qualify columns which they belong.
SELECT ev.[ID]
,[Description]
FROM [Events] as ev
LEFT JOIN [Units] as un ON ev.UnitID = un.UnitId
if Events and Units tables has same column name (ID) SQL server wants you to use aliases.