How to delete the primary index of a table in Progress, release 11.6

progress-database

I have made a table, containing an integer field, this field being used in the primary index of that table. Now I would like to replace this integer field by a character one. Therefore I need to remove all indexes of that table, including the primary one. Therefore I'm using the data dictionary, but I get following error message:

You cannot delete the primary index of a table.

How can I proceed?

Thanks

Best Answer

You need to first designate a different index as "primary" before you can drop the existing index. The data admin tool has a menu option for doing so:

Database Schema Admin DataServer Utilities PRO/SQL Tools
┌──────────────────────────────────────────────────────────────────────────────┐
│Name: CustNum                    PRIMARY UNIQUE     ACTIVE
│      ┌──────────────────────────────────┐
│Area: │  Cust_Index                      │
│      └──────────────────────────────────┘
┌─────────────────────────────┐┌───────────────────────────────────────────────┐
│ Comments                    ││Seq Field Name            Type        Asc  Abbr│
│ CountryPost                 ││─── ───────────────────── ─────────── ──── ────│
│ CustNum                     ││  1 CustNum               integer     Asc  No  │
│ Name                        ││                                               │
│ SalesRep                    ││                                               │

│                             ││                                               │
│                             ││                                               │
└─────────────────────────────┘└───────────────────────────────────────────────┘
│     Next  Prev  First  Last  Rename  Add  Delete  ChangePrimary  Uniqueness
└──── MakeInactive  Browse  SwitchTable  GoField  ROWID  Undo  ChangeLocal  Exit
 Index Editor                                                  Data Dictionary
Database: s2k (PROGRESS)               Table: Customer

Change the Primary Index of this table.

(Your screen may look different depending on what version of Progress you are running and whether or not it is Windows. But the functionality is the same...)

If you do not have another index you will first need to create one.