Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / mandar panse

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of logging in the db2 database?

1066


How do I add a column in db2?

997


What is the reason behind not using select * in embedded sql programs?

1043


What is cursor stability in db2?

1274


What is db2 plan table?

991


What language is db2 written in?

979


What does runstats do in db2?

1022


Where can you declare a cursor in a cobol-db2 program?

994


What is a plan and package in db2?

1042


Following a db2 update statement, what is the quickest way to compute the total number of updated rows?

1001


If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?

1091


What is the role of the data page in the db2 database?

971


How to find the number of rows in db2 tables?

992


What is sqlca?

998


Define data page.

1011