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

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA - 01405 - fetched column value is NULL

Re: ORA - 01405 - fetched column value is NULL

From: <un2000_at_my-dejanews.com>
Date: Wed, 05 May 1999 23:51:21 GMT
Message-ID: <7gqlho$i1m$1@nnrp1.deja.com>


In article <372DCE76.83FFA94A_at_trans-planet.com>,   uri bargil <uri_at_trans-planet.com> wrote:
> Im using a select statement in order to retreive data from the DB to my
> c program using OCI.
> I use ORACLE DB 8 , OAS 4.0.7 on SUN SOLARIS 2.6 .
> My select statement is :
> "SELECT a,b,c FROM myTable WHERE x=:x"
> a is a varchar2 , b&c are numbers in the DB.
> In my code a is a text * b is an integer and c is long.
> I get the Error in the title for executing yhis statement?
> The DB does NOT have a NULL value at any column !
> 1)What can cause this problem ?
> 2)Is it because the OCIDefineByPos() ;
> In the ORACLE TECHNET website they suggest to solve this problem with
> NVL functions - What are NVL functions , Where they can be found and how
> should I use them.
> Thank you
> Uri
> E-mail :uri_at_trans-planet.com
>
>

 NVL(null value) function can be used as follows - SELECT a,b,c FROM myTable WHERE x=:x can be written as SELECT nvl(a,'x'), nvl(b,'y'), nvl(c,'z') FROM myTable WHERE x=:x; This indicates that the select will return 'x' as a value when the value in the column "a" is null for a certain row. The same applies to b & c. Hope this helps.

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed May 05 1999 - 18:51:21 CDT

Original text of this message

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