Update cursor query