View previous topic :: View next topic
|
Author |
Message |
sanil m
New User
Joined: 24 Aug 2007 Posts: 38 Location: chennai
|
|
|
|
Hi,
What can we infer if the value of null indicator is -2, -1?
Can it take positive value also?.
Please help. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
If it is negative, it doesn't matter how big negative it is, so -2 and -1 imply the same thing, the value is negative. 1, 2, 3 all imply that the field is not null. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
Sorry, correction/clarification
Negative values mean the value is NULL
Non-Negative values mean the value is NOT NULL |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
This field is more precisely known as the Indicator, but as it is used mostly to indicate NULL's, it is informally known as the Null Indicator.
Other values are documented. From the IBM website:
Quote: |
The purposes of the indicator variable are to:
1. Specify the null value. A negative value of the indicator variable specifies the null value.
A -1 value indicates that the value that was selected was the null value.
A -2 value indicates that a numeric conversion or arithmetic expression error occurred in the SELECT list of an outer SELECT statement.
A -3 value indicates that values were not returned for the row because a hole was detected on a multiple row FETCH. The value of -3 is used only for multiple-row FETCH statements; otherwise, the only indication of a hole is a warning.
2. Record the original length of a truncated string.
3. Indicate that a character could not be converted.
4. Record the seconds portion of a time if the time is truncated on assignment to a host variable. |
|
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
Thanks for the correcting me, I don't have ready access to the docs. But the info you give doesn't say anything about using the indicator for an INSERT, UPDATE, or DELETE. |
|
Back to top |
|
|
sanil m
New User
Joined: 24 Aug 2007 Posts: 38 Location: chennai
|
|
|
|
thanx all of u!!!!.. |
|
Back to top |
|
|
sanil m
New User
Joined: 24 Aug 2007 Posts: 38 Location: chennai
|
|
|
|
so can it take +ve values also..
if than what does value +1, +2 indicate ? |
|
Back to top |
|
|
|