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 |
how to get duplicate records from tables?write qurey for this?
What is the use of reorg in db2?
when does the SQL statement gets executed when you use cursor in the application programming ?
What is alias in db2?
What is an asychronous write?
File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?
Is the primary key a clustered index?
can any one give the list of some important sql abend codes which r frequently asked in interviews?
When can an insert of a new primary key value threaten referential integrity?
What is a DBRM, PLAN ?
Why PS file called Physical seqential file?How to sore data in sequential file and ESDS file? What is the use of DBRM,PLAN,package and Collection.
select 100 records from million records ?