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 -> Blank String problems

Blank String problems

From: <dean.taplin_at_intrinsic.co.uk>
Date: Mon, 28 Jun 1999 07:59:24 GMT
Message-ID: <7l7a0o$b5c$1@nnrp1.deja.com>


I have an SQL statement that contains the following criteria:

and V.code1 is not null
and V.code1 <> ''
and V.code1 <> ' '))

On Oracle the above statement returns zero rows. If I remove the second line containing '' so that the SQL now reads:

and V.code1 is not null
and V.code1 <> ' '))

The number of rows returned is no longer zero. Why is this so?

This SQL statement works fine on all other database platforms. For Oracle '' is the same as NULL and since I am testing for '', ' ' and NULL I do not why I am getting different behaviour when I run this SQL statement on Oracle.

Any comments appreciated.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Jun 28 1999 - 02:59:24 CDT

Original text of this message

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