Does anyone know how to search for differences between 2 tables using SQL in a <CFQUERY>? I have 2 tables which are nearly identical except for some minor spelling and a couple additional rows in one table. I want to use SQL to pick out the differences, but having trouble crafting the correct SQL syntax.
I'm trying something along these lines:
<CFQUERY NAME="getdiff" DATASOURCE="mydb">
SELECT a.table1, b.table2
FROM table1 a, table2 b
WHERE a.row <> b.row
</cfquery>
However, this isn't working. It doesn't line the rows up
correctly for comparison and so picks every possible combination on non-matches. I just don't know how to do this. Thanks for any help.
I'm trying something along these lines:
<CFQUERY NAME="getdiff" DATASOURCE="mydb">
SELECT a.table1, b.table2
FROM table1 a, table2 b
WHERE a.row <> b.row
</cfquery>
However, this isn't working. It doesn't line the rows up
correctly for comparison and so picks every possible combination on non-matches. I just don't know how to do this. Thanks for any help.