2

In the previous versions of Progress database (9.X, 10.X) the below query works fine to find the primary index of the table.

select "_index-name" 
  from PUB."_index" in, PUB."_file" fi 
  where fi."_file-name"='tableName' 
  and in."rowid" =
    (select"_file"."_prime-index" 
    from PUB."_file" fs 
    where fs."_file-name"='tableName');

Now the rowid has been removed on progress v11.6, Is there any SQL query to fetch the primary index of a progress database table through ojdbc?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Vel
  • 67
  • 11

1 Answers1

6

This is working in 11.6 as well. See the following query:

select "_index-name" from PUB."_index" idx, PUB."_file" fi where fi."_file-name"='Customer' and idx.rowid =(select"_file"."_prime-index" from PUB."_file" fs where fs."_file-name"='Customer'); 

_Index-Name
--------------------------------
CustNum 
Austin
  • 1,237
  • 1
  • 11
  • 22
  • Thanks @Austin . i have changed in."rowid" to in.rowid and it worked fine. – Vel Jul 29 '16 at 05:38
  • With the implementation of table partitioning in OpenEdge 11.4: http://knowledgebase.progress.com/articles/Article/P58968 How can I change the above query to get the partition details to compare with ROWID? – Vel Jul 29 '16 at 09:02