/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_DISASSEMBLEBILL' AND KSQL_COL_NAME ='FCURRENCY') 
 ALTER TABLE T_IM_DISASSEMBLEBILL ADD (FCURRENCY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_DISASSEMBLEBILL' AND KSQL_COL_NAME ='FASYNCSTATUS') 
 ALTER TABLE T_IM_DISASSEMBLEBILL ADD (FASYNCSTATUS CHAR(1) DEFAULT 'B' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_DISASSEMBLEBILL' AND KSQL_COL_NAME ='FBOOKDATE') 
 ALTER TABLE T_IM_DISASSEMBLEBILL ADD (FBOOKDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_DISASSEMBLEBILL' AND KSQL_COL_NAME ='FBILLCRETYPE') 
 ALTER TABLE T_IM_DISASSEMBLEBILL ADD (FBILLCRETYPE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_DISASSEMBLEBILL' AND KSQL_COL_NAME ='FCOMMENT') 
 ALTER TABLE T_IM_DISASSEMBLEBILL ADD (FCOMMENT NVARCHAR(510) DEFAULT ' ' NOT NULL );

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