save & update query,  dynamic query