Thanks to all who found the time to answer my question. 

I had asked how I can invert a selection to be able to save time in finding
rows from one table with no match in a second table (find the matching rows
and invert the selection).

Here are the responses:

1.
There is a tool on the Directions Mag site which inverts current selection. 
This tool wasn't very helpful for me, because it inverts the selection in a
way that it selects all objects which don't intersect the selected objects.
My table holds the same objects multiple times with different attributes and
therefore the inverse selection wasn't really inverse. And it is not faster
than the original sql statement select * from table1 where col1 not in
(select col1 from table2)

2.
select * from table1 where col1 <> all(select col1 from selection)
This actually does an inverse selection but it is not faster than the
original sql statement select * from table1 where col1 not in (select col1
from table2). 
Col1 also has to be an unique field.
 
3.
Make a copy of table1 then 
select * from table1, table2 where table1.col1 = table2.col1 into TMP
When the TMP browser appears, hit the delete key. The only records that
remain are the ones with no match in table2 (they weren't selected.)
This works perfect but by the time I received this answer I had already
found my own work around.

My work around:
Add a column to table1 and set the value to zero.
Select * from table1,table2 where table1.col1 = table2.col1
Update added column for the selection with 1
Select * from table where added column = 0
Delete added column


Silke Keuerleber

PTV AG
Verkehrstelematik
Softwareentwicklung

Tel.:   +49 7 21 96 51- 465
Fax:    +49 7 21 96 51- 693
E-Mail: [EMAIL PROTECTED]
____________________________

PTV 
Planung Transport Verkehr AG
Stumpfstrasse 1
76131 Karlsruhe
Germany
http://www.ptv.de
http://www.reiseplanung.de
http://www.varta-guide.de
http://www.cityguidefinder.de

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to