Tuesday, February 24, 2009

Pro*C - Indicator Variables

Pro*C has some SQL syntax that cannot be directly converted to PL/SQL. A common example of this in our project is Indicator Variables.

You must have frequently seen this kind of code - SELECT xyz INTO :host_var:indicator_var - in our Pro*C code: selecting one column into more than one variable.

You can understand how this works by looking at http://www-db.stanford.edu/~ullman/fcdb/oracle/or-proc.html#indicator%20variables

The simplest workaround, of course, is to assign the indicator variable - if you need one - after your select statement in your PL/SQL code.

No comments:

Post a Comment