/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BEI_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_ELECRECEIPT' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_BEI_ELECRECEIPT ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL );

 EXEC p_AlterColumn 'T_BEI_TRANSDETAIL', 'FRULENAME', 'NVARCHAR(100)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKPAYINGBILL' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_BEI_BANKPAYINGBILL ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKAGENTPAYBILL' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_BEI_BANKAGENTPAYBILL ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_PROXYBANK' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BEI_PROXYBANK ADD (FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_TRANSTYPE' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BEI_TRANSTYPE ADD (FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL );

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