Delimiter //
/**
 * Check that the amount is not null
 *
 * @param int batchnum
 * @return void
 * @author Ben
 */
Drop Procedure if exists LOADER_CREDITLIMIT_NORMALIZE_AMOUNT_NOT_NULL //
Create Procedure LOADER_CREDITLIMIT_NORMALIZE_AMOUNT_NOT_NULL (
    In batchnum int
)
Begin
    Set @flagCountField='LOADER_CREDITLIMIT_ERRCOUNT';
    Set @flagMsgField='LOADER_CREDITLIMIT_ERRMSGS';
    Set @lastStatusField=null;
    Set @lastStatus=null;
    Set @checkedFieldName = 'CREDIT_LIMIT_AMOUNT';

    CALL LOADER_CHECK_NULL (
        'LOADER_CREDITLIMIT'
        , @checkedFieldName
        , 'LOADER_CREDITLIMIT_BATCH_NUM'
        , batchnum
        , @flagCountField
        , @flagMsgField
        , @lastStatusField
        , @lastStatus
    );
End //
Delimiter ;