Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: ORA-01722
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
![]() |
![]() |