/**Begin D:\PDM_UPGRADE\PDM1\POM_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_POM_SPLITLOG') 
 CREATE TABLE T_POM_SPLITLOG (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FCREATETIME DATETIME,
FORDERNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FORDERENTRYID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FMATERIAL BIGINT DEFAULT 0 NOT NULL,
FMATERIALMASTERID BIGINT DEFAULT 0 NOT NULL,
FPRODUCTNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FUNITID BIGINT DEFAULT 0 NOT NULL,
FAFTSPLITQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPLANQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBEFSPLITQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORDERID BIGINT DEFAULT 0 NOT NULL,
FBASEUNIT BIGINT DEFAULT 0 NOT NULL,
FPLANBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBEFSPLITBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAFTSPLITBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL
);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_POM_SPLITENTRY') 
 CREATE TABLE T_POM_SPLITENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FMODIFIERFIELD BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATEFIELD DATETIME,
FTORDERNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTORDERENTRYID BIGINT DEFAULT 0 NOT NULL,
FSPLITQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTORDERID BIGINT DEFAULT 0 NOT NULL,
FSPLITBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL
);



/**End D:\PDM_UPGRADE\PDM1\POM_table.sql **/
