Specifications

DocSTAR Level 2 Service Training Workbook Page 97
Appendix D: Commonly Used SQL Statements
SELECT SQL Statements
To find the number of pages currently stored in a DocSTAR:
SELECT * FROM PAGE
To find the number of documents that have been archived to the inbox directory
(When the inbox and review box are empty and there are no documents pending
processing; AN INVALID CONDITION):
SELECT * FROM DOCUMENT
WHERE PATH_ LIKE ‘C:\DOCSTAR\INBOX\*’
AND INDEXED_=TRUE
EXECUTE SQL Statements
To redirect the database to the proper Volume:
The following SQL redirects the Volume_ field of the document records in the database
from a System 20 Hard Drive to the Archive disk labeled Volume_0091.
UPDATE DOCUMENT
SET VOLUME_ = ‘VOLUME_0091’
WHERE VOLUME_ LIKE ‘S20-00*’
To redirect the database to the proper Path:
The following SQL redirects the Path_ field of the document records in the database from
the jukebox (0:) to the MO drive (D:).
UPDATE DOCUMENT
SET PATH_ = ‘D’ & MID$(PATH_,2)
WHERE PATH_ LIKE ‘0*’
To create Inbox records for documents that should be visible in the Inbox but are
not currently visible in the Inbox:
The following SQL will create inbox records for documents that still have an inbox path but
no inbox or review box record (as listed from the results of DBCheck.exe in DBCheck.log)
INSERT INTO INBOX
SELECT DOCID_ AS DOCID FROM DOCUMENT
WHERE PATH_ LIKE ‘C:\DOCSTAR\INBOX\*’
AND FOLDER_ = FALSE
AND DELETED_ = FALSE
AND INDEXED_= FALSE