Thanks to those who responded to my question.  I got basically three
different variations of the solution.  I believe the first two below have
been posted to the list, the third has some helpful modifications.  Thanks
again to all.

Phil Uhl
Salt Lake City

Solution #1
Each table has an implicit column named "RowID".  Add an integer column then
update it.   

Goto:
Table>Update Column

Table To Update:        Your table
Column To Update:       Your new, integer column
Get Value From Table:   Your table
Value:                  rowid



Solution #2
        Use this syntax in your mapbasic window substituting the table name
for <tablename> and the field name for <fieldname>.

Update <tablename> Set <fieldname> = rowid




Solution #3
If you want ascending integers use

        Update Table
                Set New_Column = RowId

If you want the even numbers use

         Update Table
                Set New_Column = RowId * 2

If you want the odd numbers use

         Update Table
                Set New_Column = RowId * 2 - 1



> -----Original Message-----
> 
> Hi,
> 
> How do you populate a column with ascending integers (1, 2, 3 ...) ?  I
> guess it doesn't have to be ascending integers, just unique numbers (to
> create an index column).
> 
> Thanks,
> 
> Phil Uhl
> Salt Lake City
>  
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
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