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

OutputLevel=3

Heading=Import ShelfInstance table data from HSSListe table data (all but 0 and 00 objects)
ImportSQL=		\
select REALDOCUMENTID, INSTITUTIONID, SHELFNUMBER, sum(FOLIOCOUNT) from BATCHIMPORT where REALDOCUMENTID is not null group by SHELFNUMBER order by SHELFNUMBER|			\
INSERT INTO SHELFINSTANCE (		\
		\
 USERDATA,		\
 INSTITUTIONID,		\
 SHELFNUMBER,		\
 LEAVES				\
 )		\
 VALUES ('{0}', {1}, '{2}', {3})

