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.

Answer Posted / nagendra

before open cursor we can populate that value
ex move 1220 to adb-dept

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If anyone has IBM Certification Dumps pls forward to me & also let me know what are the Certification Codes that are available in DB2

1797


What is cloudant database?

840


What are bind parameters in db2?

800


How to resolve deadlock issue

19023


What is commit in db2?

808


What is clone table?

792


What do you mean by rollback?

755


What is a system catalog table in db2?

837


What is the usage of open cursor command?

785


What are the two types of logging in the db2 database? Explain them.

801


What are the prerogatives?

803


What is view db2?

842


Mention the downsides of page level lock.

919


What is netezza database?

771


What is a db2 schema?

977