I am trying to inner join a table with another table but have the join only apply if there are conditions on the right table other than the primary index field on the right