stored procedure condition changed