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
What is dbrm library?
How do I import data from excel to db2?
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
What is consistency token in db2?
What is the difference between drop table and delete table?
How do I add a column in db2?
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.
How do I add a column to a table in db2?
What is the cobol picture clause of the db2 data types date, time, timestamp?
What is check constraint. Explain with example.
Explain about open switch business continuity software?
What is a Foreign Key?
What is the maximum size of a char data type in db2?
What is cursor with hold option in db2?
Why do we need reorg in db2?