I have this as a result of a query:
select cast(to_date(a.start_time,'mm/dd/yyyy hh:mi:ss pm') as timestamp) date_of_call, ora_rowscn from calling_table a where rownum <= 10; DATE_OF_CALLING ORA_ROWSCN 26-JUL-13 12.29.28.000000000 PM 8347567733892 26-JUL-13 12.29.35.000000000 PM 8347567733892 26-JUL-13 12.29.35.000000000 PM 8347567733892 26-JUL-13 12.29.38.000000000 PM 8347567733892 26-JUL-13 12.29.44.000000000 PM 8347567733892 26-JUL-13 12.29.47.000000000 PM 8347567733892 26-JUL-13 12.29.48.000000000 PM 8347567733892 26-JUL-13 12.29.48.000000000 PM 8347567733892 26-JUL-13 12.29.48.000000000 PM 8347567733892 26-JUL-13 12.29.56.000000000 PM 8347567733892
But when I try to convert this timestamp to scn using the timestamp_to_scn function, I get the following error:
ORA-08180: snapshot not found based on the specified time ORA-06512: in line "SYS.TIMESTAMP_TO_SCN", line 1 08180. 00000 - "snapshot not found based on the specified time" * Reason: Failed to match the time with SCN from mapping tables. * Action: try to use more time.
And when I use scn_to_timestamp for ora_rowscn to convert this column to a timestamp, I get the following error:
ORA-08181: the specified number is not a valid system change number ORA-06512: in the line "SYS.SCN_TO_TIMESTAMP", line 1 08181. 00000 - "the specified number is not a valid system change number" * Reason: the scn provided was outside the valid scn . * Action: use valid scn.
What am I doing wrong?
sql oracle datetime timestamp oracle-sqldeveloper
MontyPython
source share