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: Problem: Like-Statement and NULL-Fields

Re: Problem: Like-Statement and NULL-Fields

From: hema nainani <hema.nainani_at_oracle.com>
Date: Wed, 23 Oct 2002 10:23:24 +1000
Message-ID: <3DB5EBFC.5F91E43A@oracle.com>


Can you update the table values instead ? i.e change the null values to space instead or a default value instead update users
set flag =' ' (or default value)
where flag is null

Once you have done this you should also be able to set the table definition to a default value

select * from users where flags not like 'D%' This should now also return the space (null) values

Volker Schmid wrote:

> Hi,
>
> I try to get a recordset with the following statement:
>
> SELECT * FROM Users WHERE Flags NOT LIKE 'D%';
>
> The Problem ist, that I don't get a row if the Flags-column in this row is
> NULL. Even if I set the Flags-value of a row to '' (double ') Oracle turn's
> this to NULL. If I define the Flags-column with NOT NULL I always have to
> set this value. Trying to set a Default-Value failed.
>
> I can't change the SELECT-Statement but I'm able to change the
> table-definition. How can I get rid of this problem?
>
> Thank you,
>
> Volker


Received on Tue Oct 22 2002 - 19:23:24 CDT

Original text of this message

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