/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PMS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_SALPRICELIST' AND KSQL_COL_NAME ='FISSTAIR') 
 ALTER TABLE T_SM_SALPRICELIST ADD (FISSTAIR CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_SPLENTRY' AND KSQL_COL_NAME ='FISSTAIRPRICE') 
 ALTER TABLE T_SM_SPLENTRY ADD (FISSTAIRPRICE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SM_SALSTAIRPRICEENTRY') 
 CREATE TABLE T_SM_SALSTAIRPRICEENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FUNITID BIGINT DEFAULT 0 NOT NULL,
FSTAIRPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSTAIRQTYSTART DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSTAIRQTYEND DECIMAL(23,10) DEFAULT 0 NOT NULL
);



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PMS_table.sql **/
