Issue with Null Indicator/ db2



IBM's flagship relational database management system

Issue with Null Indicator/ db2

Postby rlimkar » Mon Mar 21, 2011 7:43 pm

Hi Friends,
The null indicator for the decimal columns of the table is not getting set though those column contains the value as NULL.
I had fired an sql in SPUFI by adding where clause as column name is null and it shows the result.
But in the program when I displyaed the value for the field and it is coming as 000 (zeroes). :o and thats why null indicator is not getting set but not able to understand from where it is getting zeros??

Not able to identify what is the issue?
Looking forward to get some replies...

Thanks in anticipation.

Note : Verfied the sql, data type, nullable column and which is fine. Just to let u all know I am using it in multirow fetch cursor.
rlimkar
 
Posts: 3
Joined: Mon Mar 21, 2011 7:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with Null Indicator/ db2

Postby stoked » Mon Mar 21, 2011 9:23 pm

rlimkar wrote:Hi Friends,
I had fired an sql in SPUFI by adding where clause as column name is null and it shows the result.

"column name is null"? I wouldn't have thought that is possible.
stoked
 
Posts: 11
Joined: Thu Mar 17, 2011 4:15 am
Location: Vancouver, BC
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with Null Indicator/ db2

Postby prino » Tue Mar 22, 2011 12:55 am

rlimkar wrote:Hi Friends,

I prefer to select my own friends!

rlimkar wrote:... I had fired an sql in SPUFI by adding where clause as column name is null and it shows the result. ...

You should not fire sql's in SPUFI, as that will severely damage the SQL.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: Issue with Null Indicator/ db2

Postby NicC » Tue Mar 22, 2011 10:56 am

Perhaps your column has a default value?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Issue with Null Indicator/ db2

Postby rlimkar » Tue Mar 22, 2011 7:22 pm

The DB2 version is changed from version 8 to 9 , is this a reason ??
rlimkar
 
Posts: 3
Joined: Mon Mar 21, 2011 7:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with Null Indicator/ db2

Postby NicC » Tue Mar 22, 2011 7:29 pm

1) did it work in version 8?
2) look at the doumentation for version 9 to see what the changes are. Do any of them look as though they could cause this?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Issue with Null Indicator/ db2

Postby rlimkar » Tue Mar 22, 2011 7:37 pm

Yes.. it was working fine in Db2 v8 .
Bcoz that was the only change happened in system after program delivered in production. And its not working i prod now..
If you have the link for the guide for Db2 v9 , could you please share..
rlimkar
 
Posts: 3
Joined: Mon Mar 21, 2011 7:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with Null Indicator/ db2

Postby NicC » Wed Mar 23, 2011 2:08 am

Clue 1: DB2 is IBM.
Clue 2: IBM has its manuals available online.
Clue 3: The forum has loads of topics mentionong how to get to the manuals
If all else fails...
Clue 4: Google
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post