I think this is what you want:select Top 1 [YourFieldListHere]from sffnd_stdoper a, inner jon sfpl_oper_v c on a.stdoper_object_id = c.stdoper_object_id inner join sfpl_plan_rev b on b.plan_id = c.plan_id and b.plan_version = c.plan_version and b.plan_revision = c.plan_revision and b.plan_alterations = c.plan_alterations inner join --MaxRevisions (select plan_id, plan_version, max(plan_revision) as plan_revision from sfpl_plan_rev group by plan_id, plan_version) MaxRevisions on b.plan_id = MaxRevisions.plan_id and b.plan_version = MaxRevisions.plan_version and b.plan_revision = MaxRevisions.plan_revision
But my memory is fuzzy on the meaning of the != operator in your original statement.