I am comparing two environments (Env1, Env2) that have had entities entered in manually so I am looking for differences across a collection of tables (Table1, Table2, Table3, ...). I am currently filtering the table comparison to a single row or collection of rows that all belong to the same entity (EntityA) by a uniqueidentifier. The uniqueidentifier is different in both environments.
First question, is it possible to define a parameter or variable so that my where clauses look something like "rowid = @Env1EntityId"
for Env1 table and "rowid = @Env2EnitityId"
for Env2 table. Otherwise I have to update a fiftty or so where clauses for each entity I want to compare without making a mistake. Any tips on this?
Once I have my project working for one entity, I could create a copy and then open in a text editor and search and replace the variables. That is my workaround at the moment.