Select empno, sal from emptbl where empno < 101.By this
query can we fetch first 100 recs? where empno is primary
key.It won't throw -811 error? if it wont,then what is use
of cursor technique while fetching first 100 recs.
Please need more clarification.
Answers were Sorted based on User's Feedback
Answer / kingmanish
Yes this query will fetch multiple records.
If tried to fetch these records in variables in a sql query
it will give -811 error.
In order to be able to handle these multiple records we
have to use cursor.
Now using cursor we can process each of these records one
at a time and thus cursors come handu here.
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / madhu t
If the to fetch empno and sal from emptble is written in
embedded sql then it will give sqlcode -811.
yes this query fetches first 100 records of employee table.
Is This Answer Correct ? | 3 Yes | 1 No |
What is a predicate?
What is difference between rollback and commit?
What is the purpose of the WHENEVER statement?
What is the physical storage length of each of the following DB2 data types: DATE, TIME, TIMESTAMP?
Which component is responsible for db2 startup and shutdown?
How can we read records for specific member in CL? AND rpg?
what is commit & rollback? When and where is used while compiling a cobol-db2 program?
i know the stpes 2 create an executable CICS/DB2 cobol code. 1. DB2 Precompiler converts the SQL Statements into COBOL API statements and creates another member with Acess plans. CodeA results in CodeB (code with API calls) & CodeC ( Access Plans ) 2.Code B is compiled/linked 2 create an exceutable.(codeE) 3.Now CodeC is binded to the database on which CodeE will be run. Can somebody provide me the sample JCLs for precompile/compile/link/bind.
why we go for SPUFI for creating tables or for sql queries?
What is a synonym? How is it used?
In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?
What are the different methods of accessing db2 from tso? How is the connection established between TSO & DB2?