auto select value from oracle (with small bug)