stored proc bdd