Category=Database Maintenance
Name=03. Migrate- Page Data to PAGE of New Data Model
Description=Grabs data from current VMR tables and imports it to populate the Page table

Heading=Import Page Data Into PAGE

OutputLevel=1
Import2LSQL=SELECT DOCUMENTID from DOCUMENT|		\
	\
SELECT			\
				\
DISTINCT '{0}',		\
lfNr,		\
folio,		\
cast(lpad(lfNr, 5, '0') as char)		\
from cont{0} order by lfNr|INSERT INTO PAGE (DOCUMENTID, PAGEID, FOLIONUMBER, SORTORDER) VALUES ({0}, '{1}', '{2}', '{3}')

IgnoreException=Error Code: 1146
