Re: More on ORA-01722

From: Harry Tuttle <SOZRBLNTLEEE_at_spammotel.com>
Date: Thu, 14 Mar 2013 22:12:21 +0100
Message-ID: <aqesofF95mkU1_at_mid.individual.net>



vsevolod afanassiev wrote on 14.03.2013 21:55:
> SQL> select * from test1722 where v = 1;
> ERROR:
> ORA-01722: invalid number
>
> It appears that Oracle converts query into:
>

The lesson is simple:

   Never, ever, under no circumstance rely on implicit typecasting.

The (only) correct way to write this query is:

select * from test1722 where v = '1';    Received on Thu Mar 14 2013 - 22:12:21 CET

Original text of this message