I need to write a select query that joins the tables based on a condition (in this case, based on a value in one of the columns). I would like to do something like this:
SELECT *
FROM TableA
INNER JOIN TableB ON (TableA.Column1 = TableB.Column1 OR TableA.Column1 = 0) -- Does not work!