re-indent and delete generated sql