/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_table.sql **/
 EXEC p_AlterColumn 'T_BE_TRANSDETAIL', 'FOPPUNIT', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_BE_TRANSDETAIL', 'FOPPBANKNUMBER', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_BE_TRANSDETAIL', 'FOPPBANK', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYCHGBILL' AND KSQL_COL_NAME ='FCHANGERECACCTBANK') 
 ALTER TABLE T_CAS_PAYCHGBILL ADD (FCHANGERECACCTBANK NVARCHAR(100) DEFAULT ' ' NOT NULL );
 EXEC p_AlterColumn 'T_CAS_CASHJOURNAL', 'FOPPUNIT', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_CASHJOURNAL', 'FOPPACCTNUMBER', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_CASHJOURNAL', 'FOPPBANK', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_CASHJOURNAL', 'FBATCHNO', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_BANKSTATEMENT', 'FOPPUNIT', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_BANKSTATEMENT', 'FOPPACCOUNTNUMBER', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_BANKSTATEMENT', 'FOPPBANK', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_ELECRECEIPT', 'FOPPUNIT', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_ELECRECEIPT', 'FOPPBANKNUMBER', 'VARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_ELECRECEIPT', 'FOPPBANK', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_BANKJOURNAL', 'FOPPUNIT', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_BANKJOURNAL', 'FOPPACCTNUMBER', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_BANKJOURNAL', 'FOPPBANK', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_CHECKEDRESULTENTRY', 'FOPPUNIT', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYCHGBILLENTRY' AND KSQL_COL_NAME ='FCHANGERECACCTBANK') 
 ALTER TABLE T_CAS_PAYCHGBILLENTRY ADD (FCHANGERECACCTBANK NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECONCILIATION_E' AND KSQL_COL_NAME ='FSEQ') 
 ALTER TABLE T_CAS_RECONCILIATION_E ADD (FSEQ BIGINT DEFAULT 0 NOT NULL );

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