Using computed columns to enable PROGRESS_RECID support of the ROWID function

Use the following procedures to create PROGRESS_RECID to support the ROWID function. Note that computed column technology is available only in MS SQL Server 2005 and later versions.

To modify a table to support the ROWID function using a computed column:

  1. Add new columns PROGRESS_RECID, PROGRESS_RECID_IDENT_, and PROGRESS_RECID_ALT_, as shown:
    ALTER TABLE table ADD PROGRESS_RECID AS 
         CASE WHEN PROGRESS_RECID_ALT_ is NULL 
            THEN  PROGRESS_RECID_IDENT_   
            ELSE  PROGRESS_RECID_ALT_    
          END PERSISTED NOT NULL, 
         PROGRESS_RECID_IDENT_ bigint identity, 
         PROGRESS_RECID_ALT_ bigint null default NULL,
         CONSTRAINT table#_#table progress_recid UNIQUE(PROGRESS_RECID)
  2. If you have already created your schema holder, delete and recreate it.