/**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_LOTMOVETRACK' AND KSQL_COL_NAME ='FBILLENTRYTYPE') 
 ALTER TABLE T_BD_LOTMOVETRACK ADD (FBILLENTRYTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_LOTMOVETRACK' AND KSQL_COL_NAME ='FBILLENTRYID') 
 ALTER TABLE T_BD_LOTMOVETRACK ADD (FBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_LOTMOVETRACK' AND KSQL_COL_NAME ='FLOTIDFIELD') 
 ALTER TABLE T_BD_LOTMOVETRACK ADD (FLOTIDFIELD NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_LOTMOVETRACK' AND KSQL_COL_NAME ='FLOTBILLCONFID') 
 ALTER TABLE T_BD_LOTMOVETRACK ADD (FLOTBILLCONFID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_LOTMOVETRACK' AND KSQL_COL_NAME ='FSRCLOTID') 
 ALTER TABLE T_BD_LOTMOVETRACK ADD (FSRCLOTID BIGINT DEFAULT 0 NOT NULL );

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