How can I add a unique number to identify each record in a browser?

In Discover 10.0 you can use the Table Utilities->Add Unique Identifier tool. Not only does this

automatically increment each record by a user-specified value (e.g. 1, 5 10 or -2), but it allows the
user to add a prefix and/or suffix to each record.



If you have an older version of Discover that does not include this tool, you can use the manual
workaround as detailed below:

  1/. Navigate to MapInfo's Table>Update Column
  2/. Under 'Table to Update' and 'Get Value From Table' options select the table you wish to update.
  3/. Set the numeric field (detailed in (a) above) as the 'Column to Update'.
  4/. In the 'Value' text box type in 'ROWID': this is a MapBasic statement which will place a unique number
       in all records starting from the number 1.

The example below will place a unique number in the column 'Unique_Number'. Each row will be populated
with its row number, hence the need to pack tables prior to running this tool.

An example of the populated table:


Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Remove Highlighting Remove Highlighting

Edit this article

User Opinions (23 votes)

100% thumbs up 0% thumbs down

How would you rate this article?




Thank you for rating this article.

Related Articles

No related articles were found.

Attachments

No attachments were found.

Last Updated on: 30th of July, 2008