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 |
Explain an outer join?
What is db2?
When is the access path determined for dynamic SQL?
wht is d/f b/w inner join and outer join ? d/f group by and order by having by ?
What is a DB2 bind?
What is the maximum length of a column name in DB2? 18 or 30 or anything other than these?
What does a deadlock mean in DB2?
If a table has a column "dept" (declared to have nulls) and there are 10 rows in the table of which 3 have a null value in the dept column, what will select count(*) and select count(distinct dept) return?
What is the reason behind not using select * in embedded sql programs?
Explain package in db2 and its advantages?
in db2, already 10 columns arie der, and i want to insert 11th column. what parameters u wil consider for insertion and how will u insert
How many types of page locks can be held in db2?