script query update