what is the total syntax for fetch ? can any one please give
me all the details of fetch ? thx
Answers were Sorted based on User's Feedback
Answer / pandu
Exec SQL
Fetch<cursorname> into :<host variables>
End-exec.
correct me is am wrong?
| Is This Answer Correct ? | 11 Yes | 0 No |
Answer / sree
YES THE ABOVE SYNTAX IS CORRECT
IF THERE ARE MORE THAN ONE HOSTVARIABLES,IE IF THERE ARE
MORE COLUMNS IN THE DB2 TABLE
SYNTAX IS
EXEC SQL
FETCH CURSORNAME INTO :HOSTVARIABLE1 ,
:HOSTVARIABLE2 ,
---
---
:HOSTVARIABLEN
END-EXEC
| Is This Answer Correct ? | 11 Yes | 0 No |
What is the database descriptor?
What action db2 takes when a program aborts in the middle of a transaction?
Q1. How will you use two different DB2 qualifiers in a single COBOL program? Suppose we have 2 tables EMP1 and EMP2 with same structure defined in two different DB2 qualifiers QUAL1.EMP1 and QUAL2.EMP2 now during first 15 days we want to use QUAL1.EMP1 and rest of the days QUAL2.EMP2 how will we do this. We can create a single program and a single load for this program.
How do run the JCL which has 25 steps by skipping the following steps 5, 10,15 and 25 without using COND statement
What are foreign keys?
What is the purpose of using commit?
How does one bind 2 versions of a CICS transaction with the same module name in two different CICS regions that share the same DB2 subsystem?
What is difference between rollback and commit?
OUTER JOINS USED TO GET MATCHING AND NONMATCHING ROWS FORM 2 OR MORE TABLES BASED ON COLUMNS. SIMPLE JOINS ALSO DO THE SAME THEN WHAT IS THE USE OF OUTER JOINS.
we can code COPY DCLGEN or INCLUDE DCLGEN, At which stage of the precompilation , dclgen get expanded if we write 1) copy 2) include one question about dclgen.. Is it mandatory to use declare table in dclgen.. I think no...but it will be used by the precompiler to validate the table name,column name etc.., can one clear my doubt ..is it necessary to include declare table or not?
if there is a table with huge number of records and if i want to extract only first 3 records from the table, what query i have to provide to retreive first 3 records
what are the bind parameters?