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 dbrm library?

664


How do I import data from excel to db2?

703


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

1705


What is consistency token in db2?

749


What is the difference between drop table and delete table?

654






How do I add a column in db2?

673


I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.

2849


How do I add a column to a table in db2?

713


What is the cobol picture clause of the db2 data types date, time, timestamp?

705


What is check constraint. Explain with example.

729


Explain about open switch business continuity software?

668


What is a Foreign Key?

744


What is the maximum size of a char data type in db2?

672


What is cursor with hold option in db2?

707


Why do we need reorg in db2?

642