updated sql satement generators