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

Home -> Community -> Mailing Lists -> Oracle-L -> Null handlings in Pro*C

Null handlings in Pro*C

From: <raman.yagna_at_db.com>
Date: Mon, 22 May 2000 16:22:49 +0800
Message-Id: <10505.106191@fatcity.com>


Hi gurus,

      Sorry for posting this question again . Can anyone help me in this regard .

Regards,
Raman

From: Raman Yagna on 15/05/2000 11:24

To: ORACLE-L_at_fatcity.com
cc:
Subject:

How to handle the indicator variables in a pl/sql block inside a Pro*C program. If we are using a select into or Fetch into then along with the host variable the indicator variable can be placed. But if the value is getting assigned to the host variable using an assignment statement , then how to put the indicator variable.

Please take the following example how the indicator variable can be put inside the PL/SQL block.

main()
{
EXEC SQL BEGIN DECLARE SECTION; varchar salary[20];
short ind_var;

EXEC SQL END DECLARE SECTION; EXEC SQL EXECUTE
DECLARE
     l_tab_sal varchar2(20);
 BEGIN      Here I call a pl/sql block with the paramters and out value as l_tab_sal;

    if l_tab_sal is null this is giving 1405 error . I can handle by specifying nvl but i want to handle thru indicator variables inside plsql block .

    :salary := l_tab_sal; /* HOW TO ASSIGN INDICATOR VARIABLE HERE */

END;
END EXEC; salary[salary.len] = '\0';
printf ("value is %s", salaray.arr); Received on Mon May 22 2000 - 03:22:49 CDT

Original text of this message

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