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?
Answers were Sorted based on User's Feedback
Answer / 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 |
What is the clustering index in the db2 database?
How does DB2 store NULL physically?
How connect db2 database to datastage?
In a single table,How to retrieve a employee-id of an employee who works in more than one department?
what is the steps followed in EXPLAIN Process or EXPLAIN command. (Explain is for identifying the optimized access path but how or what is the steps for doing the EXPLAIN)
How to check table size in db2 sap?
PLAN IS EXECUTABLE AND PACKAGE IS NOT EXECUTABLE . THEN WHAT IS THE USE OF PACKAGE?
2 Answers Tech Mahindra, Wipro,
What is the difference between base table and view?
Mention and explain the contention situations caused by locks?
What is an intent lock?
What is image copy?
What do you mean by cursor?