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: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Wed, 11 Jun 2003 12:01:17 +0000
Message-ID: <bc6up6$1rd$1@ctb-nnrp2.saix.net>


Daniel Zuppinger wrote:

> select x,x,z from tableA where x = '';
>
> The field x is defined as char 40 .It looks like the field contains 40
> 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.

Er.. what is the exact problem definition?

Does x contain spaces?
Does x contain no spaces?
Is x a null?
Is x a leak in the left plasma duct for the secondary warp core injector?

> 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 ?

Normal SQL? You call that normal SQL? Well.. some people also think that StarTrek is real.

The correct SQL looks something like:
SELECT
  bluh
FROM foo
WHERE x IS NULL

NULL is not a value. So don't treat it like one. Especially not when trying to align the warp field while running at warp 9 through some weird and funky spatial anomoly in a nebula containing pulsars.

--
Billy
Received on Wed Jun 11 2003 - 07:01:17 CDT

Original text of this message

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