begin makesql script