Category=coptot - Database Maintenance
Name=02.2. Migrate- Document
Description=Grabs data from BATCHIMPORT and imports it into the data model

OutputLevel=3

Heading=Import Document table data from HSSListe table data

# Dubious documents have had their GA number pushed into Olim in the old
# system.  This converts to DOCUMENT.FORMERGANUMBER
# this allows us to search for DUBIOUS and FORMERGANUMBER to find defunct
# GA NUMBERS
ImportSQL=select distinct  REALDOCUMENTID, CoptOTsigla, LANGUAGE, COMMENTS from BATCHIMPORT where CoptOTSigla is not null| \
 INSERT INTO DOCUMENT (								\
 	\
 DOCUMENTID, 										\
 GANUMBER, 											\
 LANGUAGE,											\
 COMMENT											\
 ) VALUES ({0}, '{1}','{2}','{3}');