Thanks to all people who replied. Sorting the VTab doesn't seem to be a big problem. Many solutions, tried a few, all of them worked. However, none is suitable for my specific problem (unioning islands with surronding polygons) since I have a theme with 25.000 shapes. Sorting the Vtab everytime after unioning two polygons is not practicable. (Note: dissolve does not work at all because of the characteristics of the shapefile) Finally I wrote a script that does the job: The attributes of the "big" polygon that I want to retain are copied into a "dummyrecord" at the end of the Vtab, any polygon resulting von unioning an island with the surronding one will get its attributes from the dummy, the dummy then will be deleted. Roland ****************** Original question: Hi, how can I (preferably using an existing script or extension) permanently change the order of records in a Vtab? Attention: I don't want to simply "sort" a table. I really want to change the order of records in the internal VTab. That means, for example that a polygon that was created first gets in the last position of the Vtab so that a loop like : "for each rec in myVTab" would address it last. The reason why I want to achieve this is the following: In a polygon theme I want to union small island polygons with surronding bigger ones. There is no common pattern in that theme which attributes the big ones and the islands have, therefor "dissolve features" does not work in this case (Otherwise I could create a "dissolve by" field in the table and so on. The "Union command" however would do the job if not the ArcView rule for assigning attributs to the resulting polygon would be as follows (from the ArcView help): " value in whichever record is FIRST in the table will be assigned " So if I could rearrage the values in the VTab by sorting them using the area of the polygons, I could use the union command and my new polygons would always get the attributes of the bigger one, which is what I want. Remember: Just sorting the table does not do the job! I'm using 3.1 Thanks for replies Roland ******************* Answers ******************** Hi Roland, Just wondered if you had tried editing the dbf files in Excel. You can sort, add fields etc as you wish. Once finished you must use the "Insert " "Name" and "define" buttons in excel to redefine database range (if you have added new fields that is). Save the dbf file and then put it back into Arcview. Hope this may help Ben ************************* An easy way is to use the "Sort and Promote" script available at http://www.quantdec.com/arcview1.htm . --Bill Huber Quantitative Decisions ********************* You may try the Compiled table tools extension, it will save any sort permanently good luck... Alberto Barud GIS Coordinator Center for Environmental Resource Management The University of Texas at El Paso (915) 747-7632 ************************* I am sure you will get lots of input on this issue, but unless you are willing to write ( or find) code to read the shape file and create a new shape file ordered the way you desire, any sorting of the VTAB (.dbf table) without modifying the index numbers stored in the shape column to keep them in correspondence with the coordinate strings in the shape file (.shp binary file) will corrupt the shape file format. ArcView expects to search the VTAB using direct reads of records based on their row index stored in the shape column and assumes that the file is sorted on the shape column index values. Take a look at a VTAB in Access and you will see the shape column contains index values linking the records to their corresponding coordinates in the .shp file. Walt ******************************* Hello Roland, You might try the attached script which I grabbed off the ESRI ArcScripts page (keyword table). You might also find other options from ArcScripts if you poke around some ("records", "sort"?). Hope this helps. Good luck. Kathi Hannaford, Union Co. GIS khannaford@unionco.org ++++++++++++++++++++++++++++++ Dipl.-Geol. Dr. Roland Barthel Universitaet Stuttgart Inst. fuer Wasserbau WAREM Pfaffenwaldring 7a 70569 Stuttgart Tel. 0711/685-6601 Fax. ++49-711-685-6600/-7020 email: roland.barthel@iws.uni-stuttgart.de