Hi Dave,

I think you can initiate the following SQL Select:

Select * from TableA where TableA.columnName not in (Select
TableB.ColumnName from TableB)

Thanks

Ami


Amel H.Assad
Deputy Managing Director
DotMap S.A.E.
13 Themar St., Moustafa Mahmoud Sq.,
Mohandsseen, Cairo, 12311, Egypt
Tel: 20-2-336-6035
Fax: 20-2-761-6922
Mobile: 20-12-325-8182
www.dotmap.com.eg

 


-----Original Message-----
From: David Baker [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 22, 2004 1:18 PM
To: [EMAIL PROTECTED]
Subject: MI-L Selecting records from 1 table that are not in another
table

I have 2 tables which I am comparing.

In some cases, table A may have more records than table B. What I want
to do is select 
all the records in table A that are not in table B, so that I can give
the user the option to 
copy these selected records over to table B.

Is there an easy way to do this using some sort of Select command? I
can't see how to 
do it. (I have MapBasic).

My alternative method is to create a copy of table A as table C, then
loop through each 
record in table C & compare with each record in table B and compare. If
I get a match I 
throw it out of table C. This will be a loop within a loop & looks like
it will take a long 
time. I'm sure there is someone out there that is smarter than me & can
think of a 
quicker way! :-)

Dave

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 10056



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 10057

Reply via email to