Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Determining if fetched data is NULL using Method 4

Re: Determining if fetched data is NULL using Method 4

From: Frank van Bortel <fbortel_at_home.nl>
Date: Fri, 10 Nov 2000 19:49:09 GMT
Message-ID: <3A0C1CAC.9B749160@home.nl>

I don't know what Method 4 is, but I do know Oracle uses three state logic: true, false and null. And no, 0 is not null! 0 is a number, null means "don't know". That is why null <> null, but 0 = 0.

If you want null to become 0, you could use the nvl function at the client side, or change the server not to accept nulls anymore: change the column to NOT NULL.

jgaiche_at_my-deja.com wrote:

> Does anyone know how to determine if data that has been fetched from
> Oracle using Method 4 dynamic sql is Null. I am using method 4 to
> fetch a block of data into a host array. I then iterate thru the array
> and process the data. In the Oracle examples, sqlnul() is used to
> reset the Null/Not Null allowed bit before reallocating memory as
> required by the query....But....I cant find a way to determine if a
> field contained a null for a particular field in a record record after
> it has been fetched. It appears that when coercing to an int or float
> that the result is not always 0 when a null value is encountered. Any
> suggestions would be greatly appreciated!
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Hth,

--
Gtrz,

Frank van Bortel
Received on Fri Nov 10 2000 - 13:49:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US