Page 2 of 2

Re: How to get the last 10 records from a table

PostPosted: Wed Apr 30, 2008 5:14 pm
by progressabhi1
Hi
The above query sent by me will work only in DB2 version 7.0 and above.
Regards
Abhi

Re: How to get the last 10 records from a table

PostPosted: Wed Apr 30, 2008 7:24 pm
by CICS Guy
progressabhi1 wrote:The above query sent by me will work only in DB2 version 7.0 and above.
Are you saying that you do not have version 7? What version do you have?

Re: How to get the last 10 records from a table

PostPosted: Wed Apr 30, 2008 9:53 pm
by dick scherrer
Hello,

What if seq_no is not a numeric field?

Re: How to get the last 10 records from a table

PostPosted: Tue May 06, 2008 9:36 am
by progressabhi1
"Are you saying that you do not have version 7? What version do you have?"

Hi
I mean to say that "FETCH FIRST 20 ROWS ONLY" works in ver7 & above as per my knowledge.I'm using version 7.1.

Regards
Abhi

Re: How to get the last 10 records from a table

PostPosted: Tue May 06, 2008 9:38 am
by progressabhi1
dick scherrer wrote:Hello,

What if seq_no is not a numeric field?



Hi
Ya, u r correct.If its not numeric field than we will have to use concept of application programming & do any sorting e.g. radix sort etc.

Regards
Abhi