HI ALL ,,
USING CURSOR HOW TO FETCH SPECIFIC RECORDS ??
SAY THERE ARE 500 RECORDS.
NEED ONLY 201 TO 300 RECORDS
TIA.
CURSOR
Moderators: Kalicharan, Moderator Group
- ibmlearner
- Member
- Posts: 13
- Joined: Sat Dec 02, 2006 5:57 pm
CURSOR
Thanks & Regards
-------------------------
Learner
-------------------------
Learner
It should be possible using the where clause where row_num between A and B.
Where u can specify values for A and B.
select {column list}
from (select {column list}, row_number() over() as
row_num from table) x where row_num between A and B.
As i said earlier i donot have DB2 in my curr proj to run a quick test and confirm u the results, try this i fit doesn work let us know we will figure out more on this.
Thanks,
Veea
Where u can specify values for A and B.
select {column list}
from (select {column list}, row_number() over() as
row_num from table) x where row_num between A and B.
As i said earlier i donot have DB2 in my curr proj to run a quick test and confirm u the results, try this i fit doesn work let us know we will figure out more on this.
Thanks,
Veea
DB2 - FETCH FIRST N RECORDS ONLY
I dont have exact answer for your question.
But here is some useful information,
FETCH FIRST 100 RECORDS ONLY
it will be first 100 records from the cursor.
But here is some useful information,
FETCH FIRST 100 RECORDS ONLY
it will be first 100 records from the cursor.
Regards,
Sheela
Sheela
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page