Consultor Eletrônico



Kbase 15498: How to dump table by RECID in ascending and descending order
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
How to dump table by RECID in ascending and descending order

INTRODUCTION:
=============

This knowlegebase entry gives an example of how to dump data from a
table by RECID in ascending and descending order.


WHY YOU NEED TO DO THIS:
========================

In the event that a particular record in a table is corrupt, dumping
the entire table via the Data Dictionary or an index may stop at
the corrupt record and not dump the entire table. With this method,
the table can be dumped by RECID in ascending order until it hits
the bad record, and then backwards in descending order until it hits
the bad record. In this way, all records except the bad record will
be dumped.


PROCEDURAL APPROACH:
====================

The following example will dump the contents of the customer table
from the Progress demo database to a file called "customer.d" by RECID
in ascending order.

OUTPUT TO customer.d.
FOR EACH customer BY RECID(customer):
EXPORT customer.

Note, ascending is the default order. You can verify this by
doing the following:

FOR EACH customer BY RECID(customer):
DISPLAY RECID(customer) name.


In order to dump in descending order, do the following:

OUTPUT TO customer.d.
FOR EACH customer BY RECID(customer) DESCENDING:
EXPORT customer.

The example above can be modified for ranges of RECID.

ONLINE PROCEDURES OR UTILITIES:
==============================

None.

REFERENCES TO WRITTEN DOCUMENTATION:
====================================

V6 System Administration Manual II: Chapter 4
V6 Language Reference Manual: FOR Statement
V7 System Administration Guide: Chapter 14
V7 Language Reference Volume 1: FOR Statement
V8 System Administration Guide: Chapter 14
V8 PROGRESS Language Reference A-F: FOR Statement

Progress Software Technical Support Note # 15498