-
Team,
I am trying this query in my database and it is returning me a value which i couldnt able to trap in java.
Here is my query
select max(id) from messages where id > 200 and parentid=0;
There is no result for this query and oracle is returningme a value i am retriving this value in my java code and tried the following:
if ( value == " ") and
if ( value == null ) it is not matching this clause at all.
What is the value which should i match if there is no matching value for the query.
thanks in advance
Seenu
-
I have not worked with java and sql, so this is speculation...
When exiting sql*plus from unix, the return code for success is 0. You might check for a numeric value instead of space or null.
Daniel W. Fink
oracledba@ix.netcom.com
-
I also have almost no experience with java. But I should look in this direction:
Two null values are never equal. That is why in SQL and PL/SQL if the variable VAR has NULL value, the following:
var = NULL
will return FALSE, while the following will return TRUE:
var IS NULL.
So try to find if in java there is something similar like
if (value IS null)
instead of
if ( value == null )
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Hi,
Instead of try like
if (var == " ")
try
if (var == "")
and see what happens......
Regards
Amit
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
|