On the move:

I'm currently moving the following to their own blogs: Unix, HTML for Blogs, Perl & Java.
The links are on the left side.

Sunday, October 5, 2008

ORA-01722: invalid number

Normally, I have no problem renaming a column its original column name after some function. This time, it's posting 'invalid number', but only after I inserted the 'Order by'.

1 Select To_Char(Trunc(Datetime) + (Trunc((Datetime - Trunc(Datetime)) *48) / 48), 'dd/Mm/Yy Hh:Mi') As Datetime
2 , Count(*)
3 From Ext_Ittbl1
4 Group By To_Char(Trunc(Datetime) + (Trunc((Datetime - Trunc(Datetime)) *48) / 48), 'dd/Mm/Yy Hh:Mi')
5* Order By To_Char(Trunc(Datetime) + (Trunc((Datetime - Trunc(Datetime)) *48) / 48), 'dd/Mm/Yy Hh:Mi')
SQL> /
Group By To_Char(Trunc(Datetime) + (Trunc((Datetime - Trunc(Datetime)) *48) / 48), 'dd/Mm/Yy Hh:Mi')
*
ERROR at line 4:
ORA-01722: invalid number

No comments:

Post a Comment