-
hello, I'm working with a jsp/oracle application.
I'm having trouble with a sql statement whose condition is that the value is null.
For example,
SELECT a, b, c
FROM myTable
WHERE condition = null;
In the table, the condition is either N or null.
I've tried
condition = ""
condition = ''
condition = null
condition = "null"
condition != 'N'
condition <> 'N'
All these do not produce any result, even though there should be at least 50 rows that have null conditions.
Is there anything that I'm not aware of when finding null values? Can anyone help me with this problem?
Thanks a lot!
-
Hello, try WHERE condition IS null
HTH, Ales
-
null condition
Hi,
Thanks for your help.
I tried using condition IS null and condition IS NULL.
The error I am getting is:
ORA-00908: missing NULL keyword.
Is there something wrong with my statement?
I tried putting single and double quotes around the null keyword, but it doesn't help.
Thanks.
-
SELECT a, b, c
FROM myTable
WHERE FIELD_NAME IS NULL;
(FIELD_NAME is a or b or ...)
http://download-west.oracle.com/otnd...s7.htm#1034482
-
null condition
Thanks for all your help Shestakov and ales,
I finally got it working.
-
Try these
SELECT a, b, c
FROM myTable
WHERE NVL(FIELD_NAME,'*') ='*';
bye
Mauro
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|