The way I've tackled finding records that don't match is to use the "Update
Column" menu command first. eg:

add column "Table1" (TempField1 char (1))
  from Table2
  set to "M"
  where Table1.Col1 = Table2.Col1
  dynamic

some points:
- this kind of update command doesn't actually make any changes to your
original table - it just creates a temporary column
- "M" is just the value I give to indicate the records that have matched
- if you do this through the menu command, you don't get to name the
temporary field (so it comes up with a field name of "_M_")
- your case is kind of special because, from what I gather, you want to see
if two of the fields match. So run a second update command for the second
field:

add column "Table1" (TempField2 char (1))
  from Table2
  set to "M"
  where Table1.Col2 = Table2.Col2
  dynamic

Then do the SQL to find where there is no "M" in the temporary fields:

select *
  from Table1
  where TempField1 <> "M" and TempField2 <> "M"
  into Selection

This will give you all the records in Table1 that don't match any records in
Table2.

I know it's a ridiculously long way of doing it, but one that I've found
necessary over the years. I hope it helps.

Simon
--------------------------------------------
Simon O'Keefe
Groundtruth GIS
Australia



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to