/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_BANKCGSETTING' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BD_BANKCGSETTING ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
 EXEC p_AlterColumn 'T_BD_BANKCGSETTING_L', 'FNAME', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_ACCPURPOSE' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BD_ACCPURPOSE ADD (FNAME NVARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_ACCPURPOSE' AND KSQL_COL_NAME ='FFULLNAME') 
 ALTER TABLE T_BD_ACCPURPOSE ADD (FFULLNAME NVARCHAR(500) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_FINORGINFO' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BD_FINORGINFO ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_BEBANK' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_BD_BEBANK ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_FINORGTYPE' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BD_FINORGTYPE ADD (FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL );

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