You need to run 3 queries, the first gathers the point objects contained in the regions, the second will count the objects in a grouping, and the third will select records where the count is greater than 1 (multiple objects). Prerequisite - the region table must have a unique field (called a Key in data base parlance) if there is none, add a field thorough Table>Maintaince>Structure. You can then populate this field through Table>Update Column, and putting the keyword ROWID in the Value box. To make a Count query work, you need to have a column in the GroupBy section, this will be the unique key field mentioned above.
Here's a working example from the mapbasic window, I have a table of Regions, called Parcels, I have a table of Point objects called Legals_01. Legals_01 is a geocoded table where each line of the legal is it's own record, so a parcel may have 3 or 4 geocoded symbols for each line of the legal. you will have to make it work for you situation, also note that QueryN (query6 and query8 in m example) will vary depending on the environment, you just need to select the last query you ran for the next step if it used a query in the Where. Select * from Parcels, _01_Legals where Parcels.obj Contains _01_Legals.obj into Selection Browse * From Query6 Select PID, Count(*) from Query6 group by PID into Selection Browse * From Selection Select * from Query7 where COL2>1 into Selection Browse * From Selection Select William "Woody" Woodruff Zoning Administrator Charter Township of Union, Isabella County, Michigan 2010 S Lincoln Rd, Mt. Pleasant, MI 48858 (989) 772 4600 EXT 41 Visit our web site at http://www.geocities.com/ctuzoning/index.htm -----Original Message----- From: Peter Hatton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 21:17 To: '[EMAIL PROTECTED]' Subject: MI-L MULTIPLE POINT SQL Hi all, Wondering if someone can help me with the following SQL. I would like to be able to perform an SQL so that I can find all polygons within my table that have multiple point objects within that polygon.I can do an SQL to find all the polygons with one point object but I wish to find all with more than one point object. Many thanks Peter Peter Hatton GIS Officer GREATER TAREE CITY COUNCIL PO BOX 482 TAREE NSW Phone 02 6592 5227 E-mail [EMAIL PROTECTED] --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 7254
