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 dbrm? What it contains? When it will be created?

1043


What is cursor stability in db2?

1349


What are the different types of base tables?

1085


How to check last update on table in db2?

1047


Is db2 a programming language?

1037


ther r 2 tables OTTABLE & SALTABLE, add the otamt from OTTABLE to empsal of SALTABLE if eid is matched else add the unmatched from OTTABLE to SALTABLE

2060


What is cascading rollback?

1203


What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?

1179


What are concurrency issues?

1090


What is cobol db2?

991


Is db2 relational database?

971


What is the connection string to connect to the DB2 Database ?

1110


How and when does the db2 enforces the unique key?

1079


What is db2 bind process?

1232


What is ibm db2 used for?

1065