kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12383 Topics: 75 Location: San Jose
|
Posted: Wed Sep 03, 2003 2:24 pm Post subject: |
|
|
baskkarsubbian,
Yes the host variable can contain null. The Indicator variable will determine this.
Indicator variables are small integers that you can use to determine whether the value of an associated output host variable is null or indicate that an input host variable value is null.If you are selecting a column which has a null value without specifying the indicator variable , the query will return a sql code of -305.
If the value for the column you retrieve is null, DB2 puts a negative value of -1 in the indicator variable. If it is null because of a numeric or character conversion error, or an arithmetic expression error, DB2 sets the indicator variable to -2.
Hope this helps...
cheers
kolusu |
|