Gerald,
    Give this a shot:

SELECT * FROM Table_B WHERE Table_B.PID NOT IN(SELECT Table_A.PID FROM
Table_A)

The principle is called a SQL-Sub Select.  The SQL engine will first select
a list of PIDs from Table_A and then compare that list to the PIDs in
Table_B.  SQL will only include those records NOT IN Table_A in the result
set.

Hope this helps!

Ian Erickson
AnalyGIS
http://www.analygis.com/


----- Original Message -----
From: "Kornelsen, Gerald" <[EMAIL PROTECTED]>
To: "MapInfo-list (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, June 04, 2001 9:35 AM
Subject: MI-L SQL question


> I'm trying to create a superset of all records from previous years' work.
>
> Is there a way to do this:
> "Select all the records from table B that are not in table A" in order to
> append these to the superset.
>
> So far, all I've been able to get to work is:
> 1. select all the records the two tables have in common,
> 2. delete from table B,
> 3. save the remainder of table B to a new name,
> 4. close table B without saving the deletions,
> 5. then append the new table to table A.
>
> If I try to do
> "Select *
> >From table A, table B
> Where tableA.PID <> table B.pid"
> MI gives an error about not having a proper join of the two tables.
>
> Any ideas, is this even possible?
>
> Gerald Kornelsen
> GIS Technologist
> City of Winnipeg
> Property Assessment Dept
>
> For those of you that need some travel inspiration, try downloading this
> month's wallpaper from
> http://www.ordsvy.gov.uk/wallpapers/currentmonth.htm
>
>
>
>
> _______________________________________________________________________
> 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.
>



_______________________________________________________________________
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