On  2 Feb, Tony Kelava wrote:
> Hi all,
> 
> I have a table as follows (example):
> 
> ID   Dist   ID_2
> 1    20    102
> 1    24    103
> 1    45    111
> 
> I want to create a table that only contains the ID, minimum DISTvalue
> and associated ID_2 value.
> 
> For example, new table ONLY contains the row of info:
> 
> ID   Dist   ID_2
> 1    20    102
> 
> and disregards the other 2 rows.
> 
> Can this be done easily. I have about 80,000 records in the database.
> 
> Regards
> 
> Tony

Use the following SQL Select:

        select ID,min(Dist),ID_2
        from SOURCETABLE
        into DESTINATIONTABLE

-- 
-----------------------------------------------------------------------
Roy Stewart             Global Atmospherics Inc.                       
Applications Developer  Manufacture and systems integrator of lightning
[EMAIL PROTECTED]    location and detection equipment and services 

                        Phone: (520) 741-2838 
2705 E. Media Rd.       Fax:   (520) 741-2848
Tucson AZ 85706-7155    Web:   http://www.glatmos.com

                   How intelligent is it, 
        to start the day by tying a noose around your neck?
-----------------------------------------------------------------------

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