/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SBD_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_AUXPTYVALUEENTRY' AND KSQL_COL_NAME ='FAPVALUENAMES') 
 ALTER TABLE T_BD_AUXPTYVALUEENTRY ADD (FAPVALUENAMES NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_AUXPTYVALUEENTRY_L') 
 CREATE TABLE T_BD_AUXPTYVALUEENTRY_L (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FAPVALUENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FAPVALUENAMES NVARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_LOTCODERULE_L' AND KSQL_COL_NAME ='FEXAMPLE') 
 ALTER TABLE T_BD_LOTCODERULE_L ADD (FEXAMPLE NVARCHAR(255) DEFAULT ' ' NOT NULL );

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