diff -r 6c169adfa383 src/org/apache/ddlutils/alteration/DataComparator.java
--- a/src/org/apache/ddlutils/alteration/DataComparator.java	Mon Jun 09 08:26:37 2014 +0200
+++ b/src/org/apache/ddlutils/alteration/DataComparator.java	Tue Jul 22 12:57:37 2014 +0200
@@ -3,10 +3,13 @@
 import java.math.BigInteger;
 import java.sql.Connection;
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.Vector;
 
 import org.apache.commons.beanutils.DynaBean;
@@ -100,6 +103,31 @@
 
     List<OBDatasetTable> tableList = dataset.getTableList();
 
+    Map<String, OBDatasetTable> readTables = new HashMap<String, OBDatasetTable>();
+    List<OBDatasetTable> tablesToRemove = new ArrayList<OBDatasetTable>();
+    for (OBDatasetTable dsTable : tableList) {
+      Table table = currentdb.findTable(dsTable.getName());
+
+      String whereClause = dsTable.getWhereclause(moduleId);
+      if (dsTable.getSecondarywhereclause() != null) {
+        whereClause += " AND " + dsTable.getSecondarywhereclause() + " ";
+        dsTable.setSecondarywhereclause(null);
+        dsTable.setWhereclause(whereClause);
+      }
+      if (readTables.containsKey(table.getName())) {
+        OBDatasetTable originalTable = readTables.get(table.getName());
+        originalTable.setWhereclause(originalTable.getWhereclause(moduleId) + " OR ("
+            + dsTable.getWhereclause(moduleId) + ")");
+        tablesToRemove.add(dsTable);
+      } else {
+        readTables.put(table.getName(), dsTable);
+      }
+    }
+
+    for (OBDatasetTable dsTable : tablesToRemove) {
+      tableList.remove(dsTable);
+    }
+
     // Now we will compare tables. If tables are equivalent in both models,
     // we will compare rows.
     for (OBDatasetTable dsTable : tableList) {
