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

What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?

716


What do you mean by commit and rollback?

598


How to fetch the last row from the table in SQL (db2)?

1043


What are the various isolation levels possible?

650


Mention the definition of cobol in varchar field.

700






What does reorg do in db2?

578


Is the primary key a clustered index?

613


in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?

1628


Why do we need reorg in db2?

566


What do you mean by rollback?

574


What is null in db2?

575


What is meant by union and union all?

591


What is ibm db2 connect?

576


ther r 2 tables OTTABLE & SALTABLE, add the otamt from OTTABLE to empsal of SALTABLE if eid is matched else add the unmatched from OTTABLE to SALTABLE

1597


On which levels locks can be applied?

663