/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_table.sql **/
 EXEC p_AlterColumn 'T_CAS_CHECKEDRESULT', 'FSTATEAMOUNT', 'DECIMAL(19,6)', 'NOT NULL', '0100', '0';

 EXEC p_AlterColumn 'T_CAS_CHECKEDRESULT', 'FJOURNALAMOUNT', 'DECIMAL(19,6)', 'NOT NULL', '0100', '0';

 EXEC p_AlterColumn 'T_CAS_AGENTPAYBILL_E', 'FVOUCHERNUM', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_PAYMENTBILL_E', 'FVOUCHERNUM', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_EXCHANGEBILL', 'FVOUCHERNUM', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_RECBILLCHANG_E', 'FVOUCHERNUM', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_RECEIVINGBILL_E', 'FVOUCHERNUM', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_CAS_CHECKEDRESULTENTRY', 'FDEBITAMOUNT', 'DECIMAL(19,6)', 'NOT NULL', '0100', '0';

 EXEC p_AlterColumn 'T_CAS_CHECKEDRESULTENTRY', 'FCREDITAMOUNT', 'DECIMAL(19,6)', 'NOT NULL', '0100', '0';

 EXEC p_AlterColumn 'T_CAS_CHECKEDRESULTENTRY', 'FBALANCEAMT', 'DECIMAL(19,6)', 'NOT NULL', '0100', '0';

 EXEC p_AlterColumn 'T_CAS_JOURNALBALANCE', 'FTYPE', 'CHAR(1)', 'NOT NULL', '1111', '''1''';

 EXEC p_AlterColumn 'T_CAS_JOURNALBALANCE', 'FCTRLSTRATEGY', 'CHAR(1)', 'NOT NULL', '1111', '''5''';

 EXEC p_AlterColumn 'T_CAS_PAYMENTBILLTYPE', 'FENABLE', 'CHAR(1)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_CAS_ACCOUNTCASHS', 'FCTRLSTRATEGY', 'CHAR(1)', 'NOT NULL', '1111', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL_E' AND KSQL_COL_NAME IN ('FHOTACCOUNT')) 
 ALTER TABLE T_CAS_PAYMENTBILL_E ADD (FHOTACCOUNT CHAR(1) DEFAULT ' ' NOT NULL );
/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_table.sql **/
