Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem: Like-Statement and NULL-Fields
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
>
>
Since you can't change the SQL directly, maybe you can do it "through the backdoor". Take a look at Virtual Private Databases (used to be called Fine-Grained Access Control, which earlier was called Row Level Security - hence the package you use is DBMS_RLS). The documentation didn't always keep up with these name changes, so it might be a little confusing at times knowing what they're talking about.
Basically, a VPD allows you to dynamically change the WHERE clause any time anyone selects from the Users table. So you can add your NULL check as a VPD feature. Received on Tue Oct 22 2002 - 11:10:02 CDT
![]() |
![]() |