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 |
In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?
What is a system catalog table in db2?
how to unload different table data into different gdg files/ vsam files.
How to insert more than one record using insert?
What are the full forms of spufi and dclgen and why are they used?
what is the input to PLAN? what is the input to DBRM?
Do we have any optinon to search part of integer in DB2 as we have for character Like,SUBSTR optins?
what is datacom db?
What will the DB2 optimizer do?
What is nvl in db2?
What is the self-referencing constraint?
What is the picture clause of the null indicator variable?