Page 1 of 1

Get small set of data from a larger DB2 Table.

Posted: Sun Nov 14, 2021 1:10 pm
by Eklavya Bharti
Hi,

I am writing a COBOL DB2 program. There is a DB2 table which has 7 million rows. I need to get only the 2020 data for the employees having the grade from 1 TO 50. Could you please advise, if I can get total count of each grade through a DB2 query. I need to run the query using a COBOL program.

Please suggest.

Re: Get small set of data from a larger DB2 Table.

Posted: Mon Nov 15, 2021 4:10 pm
by Anuj Dhawan
I think you can write a query using 'cursor', as you are working with COBOL-DB2 program. Have you tired that? Please advise.