Hi Stefano

To select all object who interescts any object in TAB2 try this

Select * from TAB1 where obj intersects any (select Obj from TAB2)

To select all object who don't intersects try this

select * from tab1 where not obj intersects any (select obj from TAB2)

to check against more than one table you have to use the selection from
query nr 1

Seelct * from selection where not obj intersects any (select obj from
QueryN)


Peter Laulund
National Survey and Cadastre, Denmark




Stefano Felici <[EMAIL PROTECTED]> - 06-07-99 09:34:05

Til:    mapinfo <[EMAIL PROTECTED]>
cc:      (bcc: Peter Laulund/MI/KMS)
VedrÝrende:    MI SQL problems



Hello.
MI pro 4.1.
I had to select all the objects in TAB1 that don't intersect any object
in TAB2, and, in another query, all the objects in TAB1 that do
intersect any object in TAB2.

It works:
"Select TAB1.COL1 from TAB1,TAB2 where TAB1.OBJ intersects TAB2.OBJ".
It gives the TAB1.OBJ's that intersect any TAB2.OBJ.

It doesn't work:
"Select TAB1.COL1 from TAB1,TAB2 where not (TAB1.OBJ intersects
TAB2.OBJ)".
The error message was (from italian) "You didn't specify how to join
TAB1 and TAB2. Invalid condition in the 'where' box".

I didn't find the correct logic (or syntax).
Any help?
Bye.
Stefano Felici.


----------------------------------------------------------------------
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