Navigation:  Document >

Documents and their revisions

Previous  Top  Next

Overview

This command will list the documents with its revisions sorted by category, document, and revision.

 

Related tables

Table

Description

Primary key (PK)

Connection tables

DCDOCREVISION

Document

CDDOCUMENT

CDREVISION

DCCATEGORY

GNREVISION

DCCATEGORY

Category

CDCATEGORY

DCDOCREVISION

GNREVISION

Revision

CDREVISION

DCDOCREVISION

 

Oracle/Postgres/SQL Server

SELECT C.IDCATEGORY, DR.IDDOCUMENT, DR.NMTITLE, R.IDREVISION, R.DTREVISION, DR.FGCURRENT /*NOTE1*/
   FROM DCDOCREVISION DR, DCCATEGORY C, GNREVISION R
   WHERE DR.CDCATEGORY = C.CDCATEGORY
   AND DR.CDREVISION = R.CDREVISION
ORDER BY C.IDCATEGORY, DR.IDDOCUMENT, DR.CDREVISION /*NOTE2*/

 

Notes

1: The DR.FGCURRENT field indicates which revision is current (value =1 current);

2: In this case, the sorting will be made through the category ID #, document ID #, and revisions.

 

Fields used on the view screen

 

document-03

 

#

Field ID

Type

Description

1

C.IDCATEGORY

VARCHAR(50) NULL


2

DR.IDDOCUMENT

VARCHAR(50) NULL


3

DR.NMTITLE

VARCHAR(255) NULL


4

R.IDREVISION

VARCHAR(50) NULL


5

R.DTREVISION

DATETIME NULL


6

DR.FGCURRENT

NUMERIC(2) NULL

1=current