IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MSPLAN_RELEASE_RECORD') 
 CREATE TABLE T_MSPLAN_RELEASE_RECORD(
FID BIGINT DEFAULT 0 NOT NULL,
FRESERVE_RECORD BIGINT DEFAULT 0 NOT NULL,
FBILL_OBJ NVARCHAR(36) DEFAULT ' ' NOT NULL,
FBILL_ID BIGINT DEFAULT 0 NOT NULL,
FBILL_ENTRY_ID BIGINT DEFAULT 0 NOT NULL,
F_BASE_QTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
F_QTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
F_QTY2ND DECIMAL(23,10) DEFAULT 0 NOT NULL,
FOP NVARCHAR(50) DEFAULT ' ' NOT NULL,
F_RELEASE_TYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
F_CREATER_ID BIGINT DEFAULT 0 NOT NULL,
FCREATE_DATE DATETIME
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MSPLAN_NCHANGETRANS') 
 CREATE TABLE T_MSPLAN_NCHANGETRANS(
FID BIGINT DEFAULT 0 NOT NULL,
FBFRECORDID BIGINT DEFAULT 0 NOT NULL,
FAFRECORDID BIGINT DEFAULT 0 NOT NULL,
FTRANSBILL NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLID BIGINT DEFAULT 0 NOT NULL,
FBILLENTRYID BIGINT DEFAULT 0 NOT NULL,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FTRANSTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL
);



