in the CURSOR declare statement, if i am using an where
clause and trying to compare the value with a host-varialble.
EXEC SQL DECLARE C1 CURSOR FOR
SELECT DEPTNO, DEPTNAME, MGRNO
FROM DEPARTMENT
WHERE ADMRDEPT = :ADM-DEPT
Where would i need to provide value to this host-variable in
the where clause. how could i pass value to this
host-variable to check it.
Answers were Sorted based on User's Feedback
Before opening this cursor thru OPEN <cursor_name>. because
when we open the cursor, it fetches all matching records
from table and stores them in buffer. so it evaluates that
where clause while opening the cursor.
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / nagendra
before open cursor we can populate that value
ex move 1220 to adb-dept
Is This Answer Correct ? | 2 Yes | 1 No |
What statistic will tell the DBA how must space can be reclaimed from dropped table spaces on the next reorg run?
How can you do the explain of a dynamic sql statement?
How Plan is created while executing the query using SPUFI?
What is the use of with ur in db2?
What are the 2 sqlcodes that are returned?
What is a db2 table?
Is ibm db2 free?
How to see the structure of db2 table??
Request to database but database is not available so what is was abend is raised?
What is db2 catalog database?
For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.
What is meant by dclgen?