[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: ORA-01722: invalid number



I noticed the FAILURECODE is defined as VARCHAR2, while the When clause has
<= varchar(8). I don't know if this is significant...

Bob Smith

> -----Original Message-----
> From: Anders Eriksson [SMTP:anders.eriksson@TELE2.SE]
> Sent: Friday, July 17, 1998 11:59 AM
> To:   Multiple recipients of list SQR-USERS
> Subject:      Re: ORA-01722: invalid number
>
> If I do a describe of the table I get the folowing output (non relevant
> columns removed):
> SQL> desc felstat
>  Name                              Null?           Type
>  -------------------------------   --------        ----
>  FAILURECODE   NOT NULL  VARCHAR2(8)
>  AR                      NUMBER(38)
>  MANAD                   NUMBER(38)
>  ANTALHWFEL                   NUMBER(38)
>  DRIFTTIMMAR             NUMBER(38)
>
> begin-select
> sum(antalhwfel)          &fsantalhwfel        <= number(38)
> sum(drifttimmar)         &fsdrifttimmar       <= number(38)
> from felstat
>      where     failurecode = $felkod and      <= varchar(8)
>           ( ( ar = #year and       <= number(38)  Any one of these four
>           manad < #month ) or            <= number(38)  rows will generate
> the
>           (ar = #f-year and        <= number(38)  error.
>           manad > #month ) )       <= number(38)
> end-select
> This is realy strange isnt it?
>
> I am starting to get the feeling that this might be a problem with my
> environment or a bugg.
> I don't think that I can run any where clause with comparason with
> numbers.
>
> I am using
> Windows NT 4.0
> Sqr 3.0.13.2/PC/Windows 3.1
> Oracle 7.3
>
> Does anybody have a clue is this a bug or am I doing anything wrong?
>
> Regards
> Anders Eriksson