Category=Database Maintenance - CAUTION
Name=Import Bohairic Euch Documents Into Database
Description=Import Bohairic Euch Documents Into Database from BEP_Mss_List_140725.csv

#Heading=Import Bohairic Euch
#ImportDupCheck=SELECT * FROM DOCUMENT WHERE DOCUMENTID={5}
#ImportFile=BEP_Mss_List_140725.csv|INSERT INTO DOCUMENT (DOCUMENTID, GANUMBER, LANGUAGE) VALUES ({5}, CONCAT('Boe ', MOD({5}, 608000)), 'bo')
#SQL=NA

#Heading2=Add dummy pages
#ImportDupCheck2=SELECT * FROM PAGE WHERE DOCUMENTID={5}
#ImportFile2=BEP_Mss_List_140725.csv|INSERT INTO PAGE (DOCUMENTID, PAGEID) VALUES ({5}, 5)
#SQL2=NA

#Heading3=Create shelf instances
#ImportDupCheck3=SELECT * FROM SHELFINSTANCE WHERE INSTITUTIONID={4} and SHELFNUMBER='{3}'
#ImportFile3=BEP_Mss_List_140725.csv|INSERT INTO SHELFINSTANCE (INSTITUTIONID, SHELFNUMBER) VALUES ({4}, '{3}')
#SQL3=NA

#Heading4=Link shelf instances with dummy pages
#ImportDupCheck4=SELECT * FROM SHELFINSTANCEPAGES WHERE SHELFID=(SELECT SHELFID FROM SHELFINSTANCE where INSTITUTIONID={4} and SHELFNUMBER='{3}') and DOCUMENTID={5} and PAGEID=5;
#ImportFile4=BEP_Mss_List_140725.csv|INSERT INTO SHELFINSTANCEPAGES (DOCUMENTID, PAGEID, SHELFID) VALUES ({5}, 5, (SELECT SHELFID FROM SHELFINSTANCE where INSTITUTIONID={4} and SHELFNUMBER='{3}'))
#SQL4=NA

Heading=Create Liturgical Feature
ImportDupCheck=SELECT * FROM FEATURE WHERE DOCUMENTID={5} and FEATURECODE='LiturgicalBookTypeCopt'
ImportFile=BEP_Mss_List_140725.csv|INSERT INTO FEATURE (DOCUMENTID, FEATURECODE, STRINGVAL1) VALUES ({5}, 'LiturgicalBookTypeCopt', 'Euchologion')
SQL=NA

#Heading=Create Language Feature
#ImportDupCheck=SELECT * FROM FEATURE WHERE DOCUMENTID={5} and FEATURECODE='Language'
#ImportFile=BEP_Mss_List_140725.csv|INSERT INTO FEATURE (DOCUMENTID, FEATURECODE, STRINGVAL1) VALUES ({5}, 'Language', 'cop-bo')
#SQL=NA

