10 pts.
 SQL LEFT OUTER JOIN – Null handling: Indicator Variables
I am using SQL Left Outer Join in an SQLRPGLEI Declare Cursor statement. I need indicator variables of SMALLINT type to handle my null returns in FETCH statements. How and where do these have to be defined? There are no SMALLINT fields in the tables I am joining. Thank you in advance for your consideration.

Software/Hardware used:
ASKED: May 16, 2005  12:35 PM
UPDATED: May 16, 2005  5:42 PM

Answer Wiki:
I have this working now. Needed to define the indicator variables in RPG thus:| D ISET# ~ S ~ 3I 0 Inz | and then pair them with the potential nulls in the FETCH statement: FETCH INTO :SET#:ISET#, etc. Values of the indicator variables are -1 when the fetched value is null. Thanks again to Ludith for putting me on track.
Last Wiki Answer Submitted:  May 16, 2005  5:42 pm  by  Stoogenut   10 pts.
All Answer Wiki Contributors:  Stoogenut   10 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _