Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...



How to handle null values in db2

Answers were Sorted based on User's Feedback



How to handle null values in db2..

Answer / lu

you need to declare binary indicator variable....
10 Ind-variable pic s(904) comp.

Is This Answer Correct ?    10 Yes 3 No

How to handle null values in db2..

Answer / biswamoy majumder

To insert a NULL, move -1 to the null indicator, To insert
a valid value, move 0 to the null indicator.
declare separately Null indictor variable in Working-
Storage section.
10 variable-NI pic s9(04) Usage comp.

Is This Answer Correct ?    5 Yes 0 No

How to handle null values in db2..

Answer / yuvaevergreen

IN DCLGEN,
>>"INDICATOR VARS .. ===> NO" indicates the presence of
null variables for the fields in the tables.
>>indicator variable should be declared of type s9(4) comp.
77 DAY-IND PIC S9(4) BINARY.
Move -1 to the indicator variable and use in sql.
exec sql
insert into employee(name)
values(:ws-name:ws-name-ind)
end-exec;
ws-name-ind is the indicator variable which inserts null in
the field ws-name.

Is This Answer Correct ?    3 Yes 0 No

How to handle null values in db2..

Answer / ankitha

you can use value function or null indicators if you want to
handle nulls in program.

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More DB2 Interview Questions

How to find last record before record through SQLRPGLE?

1 Answers   IBM,


How to find schema of a table in db2?

0 Answers  


What is a db2 cursor?

0 Answers  


What happens in bind step in a db2 program?

0 Answers  


Lot of updates have been done on a table due to which indexes have gone haywire. What do you do?

2 Answers  


What is copy pending status in db2?

0 Answers  


what is a trigger and types of triggers

3 Answers   HSBC,


What is a synonym ?

2 Answers  


What is lock escalation?

2 Answers  


How can record locking be achieved in those DB2 versions which do not support it?

0 Answers  


What is the COBOL picture clause for a DB2 column defined as DECIMAL(11,2)?

5 Answers   Emsang,


I use CS and update a page. Will the lock be released after I am done with that page?

2 Answers  


Categories