Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with TO_CHAR(timestamp, 'DD.MM.YYYY HH24:MI') --> ORA-01722

187 views
Skip to first unread message

Peter Elsen

unread,
May 17, 2003, 6:10:39 AM5/17/03
to
Hello,

my Internet-Provider has changed the Oracle DB to Version 8.1.7.
Since this update I got an ORA-01722-Error when using this statement:

SELECT TO_CHAR(timestamp, 'DD.MM.YYYY HH24:MI') FROM UMFRAGE;
--> ORA-01722: Ungültige Zahl [= invalid number]

The datefield 'timestamp' contains a trigger-generated SYSDATE.

I tried to use TO_DATE(...) instead of TO_CHAR: I resolve only Day,
Month and Year, but no time-information (hours and minutes).

What can I do to resolve the complete date- and timeinformation ?

Thank You!

Peter

Paul Brewer

unread,
May 17, 2003, 12:57:23 PM5/17/03
to
"Peter Elsen" <p.e...@kreis-dueren.de> wrote in message
news:955858ba.03051...@posting.google.com...

I bet "timestamp" is not really a date column...

in SQL*Plus,
desc umfrage

Regards,
Paul


JustAnotherDBA

unread,
May 18, 2003, 12:20:01 AM5/18/03
to
The timestamp column is probably defined as a varchar2 .

--

"Peter Elsen" <p.e...@kreis-dueren.de> wrote in message
news:955858ba.03051...@posting.google.com...

Peter Elsen

unread,
May 19, 2003, 1:32:32 AM5/19/03
to
Dear oracle-users,

you are so right! I was stupid, to forget controlling the
table-definition!
The timestamp-field was defined as as varchar2. Sometimes the
oracle-schema-manager from the 7.4.3-Client-Version plays something
strange...

Thank you for answering so quickly!

Peter

"JustAnotherDBA" <burttemp1R...@bellsouth.net> wrote in message news:<YJDxa.68463$dc5....@fe09.atl2.webusenet.com>...

0 new messages