IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FFAILTYPE') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FFAILTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FSCHEDULE') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FSCHEDULE NVARCHAR(500) DEFAULT ' ' NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MRP_PLANNOTIFIERENTRY') 
 CREATE TABLE T_MRP_PLANNOTIFIERENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FENYTRYNOTIFIERS BIGINT DEFAULT 0 NOT NULL,
FENTRYPROORPURORG BIGINT DEFAULT 0 NOT NULL
);

