Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: [Q] Porting SQL to Oracle
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.
-- BillyReceived on Wed Jun 11 2003 - 07:01:17 CDT