Fixed Oracle dialect issues pointed by roymax.