Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to distinguish DB2 null ?

843859Aug 25 2006 — edited Aug 27 2006
Hie . I'm a newbie and really stuck. please help!

From my understanding , a DB2 column that is null doesnt have any values in it , hence empty .

So when i do a SELECT statement which returns a result set such as below :
import com.ibm.db.SelectResult;
SelectResult objResult;
RUN select statement ; which returns objResult
objResult.getColumnValueToString(COLUMN NAME)
returns a String object.

COLUMN NAME is a nullable column in the database and may have null entries or "empty" entries.

For the rows where the column value is null (empty) it doesnt return anything , be it an empty string such as " " or null. Its just plain empty.

I'm figuring out of a condition that will flag out if its empty due to the non-existent of value in the current column but to no avail .
I dont know if all this makes sense. Any takers out there ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 24 2006
Added on Aug 25 2006
4 comments
255 views