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...

Suppose the outcome of executing a query results in a row
having null. Based on the answer how you use it? Its
declaration and inclusion?

Answer Posted / mani

While declaring the cursor include the null indicator for
the variables which you are retrieiving from the table.

Example.

Select empno,deptname from emp into
:ws-empno:ws-empno-ind,:ws-deptname:ws-deptname-ind
where empname='....'

Based on the values in ws-empno-ind,ws-deptname-ind we can
know whether the vaules being retrived are null are not.
If null indicator variable has a value -1 then the retrieved
value is null.

If you do no specify null indicator variable and the value
retreived is null then you would get -305 as the sqlcode.

The null indicator is declared as
05 ws-empno-ind s9(4) comp

Is This Answer Correct ?    22 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the physical storage length of the data types: date, time, timestamp in the db2 database?

1102


How is a typical db2 batch pgm executed?

1110


What is runstats db2?

967


I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?

2340


Explain how can you do the explain of a dynamic sql statement?

1066


Explain about cursor stability?

985


What is concurrency?

1152


What are the benefits of using the db2 database?

1156


What is table space in db2?

963


what is db2 restart?

2104


Are view updateable?

984


What is meant by dclgen?

1061


What type of database is db2?

913


What is the difference between oracle and db2?

1033


What is page size in db2?

906