/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BAS_ATTACHMENT_OPLOG' AND KSQL_COL_NAME ='FFILENAME') 
 ALTER TABLE T_BAS_ATTACHMENT_OPLOG ADD (FFILENAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BAS_ATTACHMENT_OPLOG' AND KSQL_COL_NAME ='FFILEEXT') 
 ALTER TABLE T_BAS_ATTACHMENT_OPLOG ADD (FFILEEXT NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BAS_ATTACHMENT_OPLOG' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_BAS_ATTACHMENT_OPLOG ADD (FDESCRIPTION NVARCHAR(500) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BAS_ATTACHMENT_OPLOG' AND KSQL_COL_NAME ='FURL') 
 ALTER TABLE T_BAS_ATTACHMENT_OPLOG ADD (FURL NVARCHAR(500) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BAS_ATTACHMENT_OPLOG' AND KSQL_COL_NAME ='FBILLNO') 
 ALTER TABLE T_BAS_ATTACHMENT_OPLOG ADD (FBILLNO NVARCHAR(500) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BAS_ATTACHMENT_OPLOG' AND KSQL_COL_NAME ='FFILELOCATION') 
 ALTER TABLE T_BAS_ATTACHMENT_OPLOG ADD (FFILELOCATION CHAR(1) DEFAULT '1' NOT NULL );
/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_table.sql **/
