Create and run SQL scripts from templates