OT: SQL question
Mike Cantrell
yomahz@devnull.org
Wed, 13 Sep 2000 20:20:28 -0700
I know it's a bit off topic but I was hoping someone here could help.
At my new job, they they don't want me accessing the database (Oracle
8i) tables directly (I guess for security purposes) so they've created
views for me to get my data from. I've ran into several strange problems
like:
SELECT count(*) FROM foo WHERE bar NOT LIKE 'String';
if the field bar is null, it doesn't count it even though it should
(right?) since null is definitely not like 'String'. If I suspect a
possible null value in my condition (I can't even use sqlplus to tell
what fields can be null). I have to do this:
SELECT count(*) FROM foo WHERE bar NOT LIKE 'String' OR bar IS NULL;
This isn't normal for Oracle is it? Could it be a problem w/ the way the
view was created? Any thoughts? I'm going to have a meeting w/ the
Oracle guys tomorrow and I don't want to look like an idiot :)
Regards,
Mike Cantrell