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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 9i and "lenient" SQL parsing

Re: Oracle 9i and "lenient" SQL parsing

From: Eric Worthy <fast_johnnyz_at_yahoo_NOSPAMME.com>
Date: Mon, 28 Jan 2002 08:55:25 -0700
Message-ID: <3C55746D.1040909@yahoo_NOSPAMME.com>


Works in 8i. Still incorrect SQL though. Tell them just because it works, doesn't mean it's valid. They are trying to take the easy way out....

SQL> create table tipi_latte(tip_lat_cod number, tip_lat_des varchar2(50));

Table created.

SQL> select * from tipi_latte where tip_lat_cod=1and tip_lat_des like 'A%';

no rows selected

SQL> Cristian Veronesi wrote:

> Hello.
> We are trying to run a third-party Windows app written for Oracle 8i
> against a 9.0.1.2 database running on SuSE SLES7.
> This apps tries to issue a SQL statement like that (notice the missing
> space between "1" and "and"):
>
> select * from tipi_latte where tip_lat_cod=1and tip_lat_des like 'A%' ;
>
> I said to the third-party developers that this is an incorrect SQL
> statement but they says that against Oracle 8i it works.
> I don't have an Oracle 8i instance to try but I have a 7.3.4 one so I
> tried:
>
> SQL> select * from tipi_latte where tip_lat_cod=1and tip_lat_des like
> 'A%';
>
> TIP_LAT_COD TIP_LAT_DES
> ----------- --------------------------------------------------
> 1 Alimentare
>
> It works!!! And here's the result against the 9i database instead:
>
> SQL> select * from tipi_latte where tip_lat_cod=1and tip_lat_des like
> 'A%';
> select * from tipi_latte where tip_lat_cod=1and tip_lat_des like 'A%'
> *
> ERROR at line 1:
> ORA-01722: invalid number
>
> Is there a way to tell Oracle 9i to be more lenient with this type of
> statements?
>
> I noticed that parameter "compatible" is set to 9.0.0. I tried to set it
> to 8.1.0 but the database gave me a couple of errors on startup (sorry,
> I did not captured the error messages).
>
> Any suggestion?
>
> Regards, Cristian
>
>
Received on Mon Jan 28 2002 - 09:55:25 CST

Original text of this message

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