how to define NULL in where clause OCI
322402Dec 29 2003 — edited Mar 19 2004Hi everyone,
I have a query "select name from emp where job = :JOB"
and i have a certain row where the job is NULL. Now in the OCI docs it says that if a bound variable has to have a NULL value we just have to set the indicator variable to -1. And I did that in the OCIDefineByPos function. But still when I execute I get the no rows found answer.
If I change the query to "select name from emp where job is null" (after removing the bound clause) i get the proper answer. Funny this has to happen because I am able to insert NULLs using OCI this way but not put them in the where clause.
Does this mean that i have to use the "is null" in my SQL? Or am I missing something in the OCIDefineByPos?
Thanks
Kind Regards
Aby Philip