Delimiter //
/**
 * Checks that the account's ref is not null
 *
 * @param int batchnum
 * @return void
*/
Drop Procedure if exists LOADER_CONTACTS_NORMALIZE_ACCOUNT_REF_NOT_NULL//

Create Procedure LOADER_CONTACTS_NORMALIZE_ACCOUNT_REF_NOT_NULL (
    In batchnum int
)
Begin

    Set @loader_type = GET_LOADER_INFO('LOADER_TYPE', batchnum);
    If  @loader_type = 'CONTACTS' Then    

        CALL LOADER_CONTACTS_CHECK_NULL (
            'ACCOUNTS_REF'
            , batchnum, 0, null
        );

    End If;

End //

Delimiter ;