/**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_BANKTRANSDOWN_ENTRY' AND KSQL_COL_NAME ='FSONACCTNAME') 
 ALTER TABLE T_BEI_BANKTRANSDOWN_ENTRY ADD (FSONACCTNAME NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSDOWN_ENTRY' AND KSQL_COL_NAME ='FSONACCTORG') 
 ALTER TABLE T_BEI_BANKTRANSDOWN_ENTRY ADD (FSONACCTORG NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSDOWN_ENTRY' AND KSQL_COL_NAME ='FSONACCTNUMBER') 
 ALTER TABLE T_BEI_BANKTRANSDOWN_ENTRY ADD (FSONACCTNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSDOWN_ENTRY' AND KSQL_COL_NAME ='FSONACCTBANKNAME') 
 ALTER TABLE T_BEI_BANKTRANSDOWN_ENTRY ADD (FSONACCTBANKNAME NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSDOWN_ENTRY' AND KSQL_COL_NAME ='FSONACCTCITY') 
 ALTER TABLE T_BEI_BANKTRANSDOWN_ENTRY ADD (FSONACCTCITY NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSDOWN_ENTRY' AND KSQL_COL_NAME ='FSONACCTPROVINCE') 
 ALTER TABLE T_BEI_BANKTRANSDOWN_ENTRY ADD (FSONACCTPROVINCE NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUP_ENTRY' AND KSQL_COL_NAME ='FSONACCTNAME') 
 ALTER TABLE T_BEI_BANKTRANSUP_ENTRY ADD (FSONACCTNAME NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUP_ENTRY' AND KSQL_COL_NAME ='FSONACCTORG') 
 ALTER TABLE T_BEI_BANKTRANSUP_ENTRY ADD (FSONACCTORG NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUP_ENTRY' AND KSQL_COL_NAME ='FSONACCTNUMBER') 
 ALTER TABLE T_BEI_BANKTRANSUP_ENTRY ADD (FSONACCTNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUP_ENTRY' AND KSQL_COL_NAME ='FSONACCTBANKNAME') 
 ALTER TABLE T_BEI_BANKTRANSUP_ENTRY ADD (FSONACCTBANKNAME NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUP_ENTRY' AND KSQL_COL_NAME ='FSONACCTCITY') 
 ALTER TABLE T_BEI_BANKTRANSUP_ENTRY ADD (FSONACCTCITY NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUP_ENTRY' AND KSQL_COL_NAME ='FSONACCTPROVINCE') 
 ALTER TABLE T_BEI_BANKTRANSUP_ENTRY ADD (FSONACCTPROVINCE NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSDOWNBILL' AND KSQL_COL_NAME ='FMONACCTNAME') 
 ALTER TABLE T_BEI_BANKTRANSDOWNBILL ADD (FMONACCTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSDOWNBILL' AND KSQL_COL_NAME ='FMONACCTORG') 
 ALTER TABLE T_BEI_BANKTRANSDOWNBILL ADD (FMONACCTORG NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSDOWNBILL' AND KSQL_COL_NAME ='FMONACCTNUMBER') 
 ALTER TABLE T_BEI_BANKTRANSDOWNBILL ADD (FMONACCTNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSDOWNBILL' AND KSQL_COL_NAME ='FMONACCTBANKNAME') 
 ALTER TABLE T_BEI_BANKTRANSDOWNBILL ADD (FMONACCTBANKNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSDOWNBILL' AND KSQL_COL_NAME ='FMONACCTCITY') 
 ALTER TABLE T_BEI_BANKTRANSDOWNBILL ADD (FMONACCTCITY NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSDOWNBILL' AND KSQL_COL_NAME ='FMONACCTPROVINCE') 
 ALTER TABLE T_BEI_BANKTRANSDOWNBILL ADD (FMONACCTPROVINCE NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUPBILL' AND KSQL_COL_NAME ='FMONACCTNAME') 
 ALTER TABLE T_BEI_BANKTRANSUPBILL ADD (FMONACCTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUPBILL' AND KSQL_COL_NAME ='FMONACCTORG') 
 ALTER TABLE T_BEI_BANKTRANSUPBILL ADD (FMONACCTORG NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUPBILL' AND KSQL_COL_NAME ='FMONACCTNUMBER') 
 ALTER TABLE T_BEI_BANKTRANSUPBILL ADD (FMONACCTNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUPBILL' AND KSQL_COL_NAME ='FMONACCTBANKNAME') 
 ALTER TABLE T_BEI_BANKTRANSUPBILL ADD (FMONACCTBANKNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUPBILL' AND KSQL_COL_NAME ='FMONACCTCITY') 
 ALTER TABLE T_BEI_BANKTRANSUPBILL ADD (FMONACCTCITY NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKTRANSUPBILL' AND KSQL_COL_NAME ='FMONACCTPROVINCE') 
 ALTER TABLE T_BEI_BANKTRANSUPBILL ADD (FMONACCTPROVINCE NVARCHAR(255) DEFAULT ' ' NOT NULL );

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