minor update to sql script