To find duplicates, and how many here are, try grouping on the newly updated extracted_text field and counting the records in each group with Count(*). You may also want to add an ID field and populate with ROWID function so as you try and determine which duplicates to delete, you will have a way to identify each separate occurrence of duplicate text, and a way to automatically select only one of any duplicate text string.
Select Extracted_text, Count(*) from mytable Group by Extracted_text into DuplicateText Select* from DuplicateText where Count>1 To retrieve only one of any duplicated text, try Select MIN(RowID)from MyTable group by Extracted_Text into ThereCanBeOnlyOne Map from ThereCanBeOnlyOne William "Woody" Woodruff Zoning Administrator Charter Township of Union, Isabella County, Michigan -84.80947000 43.61095100 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: Mats Elfstr�m [mailto:[EMAIL PROTECTED] Sent: April 05, 2004 07:05 To: Sabin Mark <Mark.Sabin Cc: [EMAIL PROTECTED] Subject: MI-L Ang. MI-L Duplicated text in a table Hi Sabin! As you have noticed, the text visible on the map is not stored in the attribute table, but is a property of the geographic object. (as is font, style, color and so on). But for many purposes, it is often adviseable to store the text string in the table as well. (But remember, these two know nothing of each other afterwards) Add a new field to the table, I called mine Extracted_text. Then use update column, or the MapBasic window to perform an update of the new column, using ObjectInfo(obj,3) as expression. Update text_tab Set Extracted_text = ObjectInfo(obj,3) This will extract the text string from each object and store it in your new column. For removing duplicates, I have no straightforward method or code, but if it is as you suppose, that the table has been appended to itself and not been edited or resorted since then, you should be able to see halfway down where the duplicates begin. HTH and Best regards Mats.E ________________________ FB Engineering AB S�dra F�rstadsgatan 26 211 43 Malm� Tel: 040-665 64 80 Mobil: 0705-27 60 27 Fax: 040-665 69 90 e-post: [EMAIL PROTECTED] http://www.fbe.se Sabin Mark <[EMAIL PROTECTED]> 2004-04-05 12:02 Till [EMAIL PROTECTED] Kopia �rende MI-L Duplicated text in a table Hi I have a large table with duplicated text (it looks as though a recent version of the table has been appended to an old one). I do not have the source data so cannot simply change the data to the latest version. Does anyone have a quick fix for locating duplicated strings of text from the map (as the text is not included in the attributes for the record) deleting the duplication, therefore leaving a single text string at that location? TIA ********************************************************************** Content: The views expressed in this email are personal and may not necessarily reflect those of South Derbyshire District Council, unless explicitly stated otherwise. Confidentiality: This e-mail and its attachments are intended for the above named only and may be confidential. If they have come to you in error you must take no action based on them, nor must you copy or show them to anyone; please reply to this e-mail and highlight the error. ********************************************************************** --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 11271 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 11272 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 11338
