We have a table containing coordinates, among other things. We used to store these in two number fields (x and y), but we've now replaced this with an SDO_GEOMETRY field. For backwards compatibility, we have created a view (with the same name as the table used to have), where we do:
create or replace view meas_pnt as select ..., m.position.SDO_POINT.X x_coordinate, m.position.SDO_POINT.Y y_coordinate from meas_pnt_tab m;
This works for both reading and writing, but when writing decimal numbers to the view, the decimals are lost. I can't figure out why. Can anybody help? The following illustrates the problem:
update meas_pnt_tab m set m.position.SDO_POINT.x = 2.3 where meas_key=1; select m.position.SDO_POINT.X from meas_pnt_tab m where meas_key=1; -> x is 2.3. Good!
update meas_pnt set x_coordinate = 2.3 where meas_key=1; select m.position.SDO_POINT.X from meas_pnt_tab m where meas_key=1; -> x is 2.