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

Home -> Community -> Usenet -> c.d.o.misc -> Unexplainable SQL-error message

Unexplainable SQL-error message

From: F.Th.G. Heijmans <no_F.Th.G.Heijmans_at_inter.nl.net_spam>
Date: Sun, 07 Nov 1999 13:26:14 GMT
Message-ID: <38257c6d.2982797@news.xs4all.nl>


Hi,

Can anyone tell me where this error-message comes from

  1 select to_number(accountnr)
  2 from invoces
  3 where projectnr = 'R1099'
  4 and to_number(accountnr) > 0   

TO_NUMBER(ACCOUNTNR)


              1040706
            313102015
               871540
              1748160
            446338508
            337611602
               485724
            674154029
              1166821
            336036337
              5015662
               897975
              1172139
            811702634
            572054114

ERROR:
ORA-01722: invalid number

Accountnr is stored in the dabase as a varchar2(10). When I run the same query without the >0 there is no problem

  1 select to_number(accountnr)
  2 from invoces
  3 where projectnr = 'R1099'

This is not at all what I would expect. All the numbers are fine, I checked that. Appearantly ORA-01722 is not the real error.

If I vary the size of the comparison (>0, >1000000) I get a different list, but it still stops after the 15th row with the same error.

Is there anyone who can explain this to me?

Regards,

Frank Received on Sun Nov 07 1999 - 07:26:14 CST

Original text of this message

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