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 -> Re: [Q] Porting SQL to Oracle

Re: [Q] Porting SQL to Oracle

From: Daniel Zuppinger <zuppinger_at_the_infobrain_at_infobREMOVE_CAPITAL_rain.com>
Date: Fri, 13 Jun 2003 10:38:18 +0200
Message-ID: <3ee98da8$0$9513$4d4ef98e@read.news.ch.uu.net>


"Hans Forbrich" <forbrich_at_telusplanet.net> schrieb im Newsbeitrag news:3EE7211B.1145D8A8_at_telusplanet.net...
> Daniel Zuppinger wrote:
>
> > Hi,
> >
> > We have the following SQL Statement wich must run against a table on a
> > Oracle DB:
> >
> > select x,x,z from tableA where x = '';
> >
> > The field x is defined as char 40 .It looks like the field contains 40
>
> Datatype "CHAR" is a fixed length type. You are probably looking for
datatype
> "VARCHAR2".
Hi Hans,

Thanks, this seems the only answer in a lage selection of postings which really addresses my problem. Many thanks.

Regards Daniel

>
> BTW - Oracle runs SQL natively - you do not need to *PORT* SQL to Oracle.
(Or
> perhaps you are referring to Microsoft's product SQL Server? .)

By porting I mean that I want the same SQL statement for all supported DB's and get the SAME results.

>
> > blanks. The SQL statement does NOT return these rows as expected. We
have
> > found that the syntax ' where trim(x) is null' works. But this is not
> > acceptable for us, since we need to support several database systems.
> >
> > Now the question: Can we force oracle to accept the normal sql statement
as
> > shown above for our application ? Maybe a environment variable or
similar ?
> >
>
> Probably not necessary if you use the correct datatype - see above.
> /Hans
>
>
Received on Fri Jun 13 2003 - 03:38:18 CDT

Original text of this message

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