🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.databases.oracle.server
Article #75

Re: Dynamic SQL in PRO-C (type 3), problem with NULL

#75
From: Keith Jamieson
Date: Tue, 04 Apr 2000 00:00
28 lines
1899 bytes
What you shoud do is actually declare a variable as short int.

your select then looks something like follows:

exec select  column_name into column_value:null_ind;

Now if you retrieve a select, null_ind is set to -1.
This is the correct way to code for Nulls using PRO*C.

Riccardo D.S. wrote in message
<38E49951.D6D2CB0A@aleniasystems.finmeccanica.it>...
>I use e dynamic SQL statment (pro c - type 3 ) to estract
>the value of single column and put it in the host-variable.
>When the return of query is Null the SQL statment  go in error .
>Is it possible when this occur continue the process?
>Now use the NVL function to return a particulat string
>or number when the value is NULL. I prefer ignore the select
>when tha value is Null and continue to other select.
>
>Thanks,
>Sorry for my english...
>
>I'm italian
>
>Dott. Riccardo Di Stefano
>Alenia Marconi System s.p.a.
>Rome - Italy
>
Technical Details
Message-ID: <8ccouq$h70$1@kermit.esat.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38E49951.D6D2CB0A@aleniasystems.finmeccanica.it>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fa4f9,a8bbdcae33011cd9
X-Google-Attributes: gidfa4f9,public
X-Google-Thread: f99a8,a8bbdcae33011cd9
X-Google-Attributes: gidf99a8,public
X-Google-Thread: 103117,a8bbdcae33011cd9
X-Google-Attributes: gid103117,public
X-Google-Thread: f5464,a8bbdcae33011cd9
X-Google-Attributes: gidf5464,public
From: "Keith Jamieson" <jamiesonk@phoenix.ie>
Subject: Re: Dynamic SQL in PRO-C (type 3), problem with NULL
Date: 2000/04/04
Message-ID: <8ccouq$h70$1@kermit.esat.net>
X-Deja-AN: 606537465
References: <38E49951.D6D2CB0A@aleniasystems.finmeccanica.it>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
X-Complaints-To: abuse@esat.net
X-Trace: kermit.esat.net 954853146 17632 193.120.136.67 (4 Apr 2000 12:59:06 GMT)
Organization: Esat Net  
NNTP-Posting-Date: 4 Apr 2000 12:59:06 GMT
Newsgroups: comp.databases.oracle.server,comp.databases.oracle.tools,cern.oracle.cde,comp.databases.oracle.misc