Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: ORA-01722

Re: ORA-01722

From: Kenny Gump <kgump_at_mylanlabs.com>
Date: Thu, 7 Sep 2000 07:49:12 -0400
Message-ID: <39b780b8_2@News.Mountain.Net>

select asset, barcode from value
where to_char(to_date('17991231','yyyymmdd') + to_number(valdate),'yyyymmdd')='20000630';

This query will work provided that valdate is a character string that can be converted to a valid number. From the column name it looks like a date datatype and to_number will not use a date. Check the values and datatype for valdate.

Kenny
"SCB PC Team" <scbpbis_at_singnet.com.sg> wrote in message news:8p75su$3ec$1_at_violet.singnet.com.sg...
> I was trying to get a query out but I got ORA-01722 Invalid number. What
> does it mean? My query goes:
> select asset, barcode from value
> where to_char(to_date('17991231','yyyymmdd') +
> to_number(valdate),'yyyymmdd')='20000630';
>
> This latter formula is to convert some int to date format. Somehow this
> formula doesn't work.
> BUT this query works if I replace = with <.
>
> Can anyone advise me what to do? Is there anything wrong with the table?
>
> Rgds,
> Soong.
>
>
>
Received on Thu Sep 07 2000 - 06:49:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US