Consultor Eletrônico



Kbase 33883: Demonstrate the use of descending indexes with SQL Server
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Solution ID: P3883

GOAL:

How to demonstrate the use of descending indexes with SQL Server

FACT(s) (Environment):

Windows 32 Intel
Windows NT 32 Intel/Windows 2000
SQL Server 7
Progress 9.1C
Progress 9.1D

FIX:

1. Using Progress 9.1C or 9.1D, create a new empty Database
2. Create a new Table with 1 field
3. Create a Descending Index which contain the field created earlier

Ex :
Table : tbl
Field : fld
Index : myIndex(fld) --> should be defined from Data Dictionary as DESC index

4. Add the following records (can be done from Procedure Editor) :
insert into tbl values('jmr').
insert into tbl values('fleste').
insert into tbl values('ces').
insert into tbl values('zorro').
insert into tbl values('antoine').

5. Migrate this DB to SQL Server

6. Connect to the SQL Server DB using the connection option -Dsrv qt_debug,SQL

7. Run the following query :

for each tbl:
disp fld.

You will see that the result will be sorted in DESCing order.

8. Review the dataserv.lg file. You will see there that the ORDER BY "fld" DESC is used. This is done by the DataServer because of the option Descending Index when doing the migration.