Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert long datatype to varchar2/timestamp

hsemarApr 21 2017 — edited Apr 22 2017

Hi,

I'm trying to convert the long datatype to timestamp/varchar2.  I'm failing in conversion to use to_char/cast/to_timestamp functions.   Basically,  I'm trying to convert the high_value column in the user_tab_partitions where in which high_value is a long datatype.

select * from user_tab_partitions;

X_PartitionNORS_OLD_RANGE0TIMESTAMP' 2014-01-01 00:00:00'311DATA110
X_PartitionNOSYS_P1720TIMESTAMP' 2014-02-01 00:00:00'312DATA110
X_PartitionNOSYS_P1730TIMESTAMP' 2014-03-01 00:00:00'313DATA110
X_PartitionNOSYS_P1740TIMESTAMP' 2014-04-01 00:00:00'314DATA110
X_PartitionNOSYS_P1750TIMESTAMP' 2014-05-01 00:00:00'315DATA110
X_PartitionNOSYS_P1760TIMESTAMP' 2014-06-01 00:00:00'316DATA110
X_PartitionNOSYS_P1770TIMESTAMP' 2014-07-01 00:00:00'317DATA110
X_PartitionNOSYS_P1780TIMESTAMP' 2014-08-01 00:00:00'318DATA110
X_PartitionNOSYS_P1790TIMESTAMP' 2014-09-01 00:00:00'319DATA110
X_PartitionNOSYS_P1800TIMESTAMP' 2014-10-01 00:00:00'3110DATA110
X_PartitionNOSYS_P1810TIMESTAMP' 2014-11-01 00:00:00'3111DATA110
X_PartitionNOSYS_P1820TIMESTAMP' 2014-12-01 00:00:00'3112DATA110
X_PartitionNOSYS_P1660TIMESTAMP' 2015-01-01 00:00:00'3113DATA110
X_PartitionNOSYS_P1700TIMESTAMP' 2015-02-01 00:00:00'3114DATA110
X_PartitionNOSYS_P1670TIMESTAMP' 2015-03-01 00:00:00'3115DATA110
X_PartitionNOSYS_P1710TIMESTAMP' 2015-04-01 00:00:00'3116DATA110
X_PartitionNOSYS_P1680TIMESTAMP' 2015-05-01 00:00:00'3117DATA110
X_PartitionNOSYS_P1690TIMESTAMP' 2015-06-01 00:00:00'3118DATA110
This post has been answered by Paulzip on Apr 21 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 19 2017
Added on Apr 21 2017
6 comments
4,164 views