MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to retrieve 5th row only from a table?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Interview Q & A
View previous topic :: View next topic  
Author Message
siva233
Beginner


Joined: 22 Mar 2006
Posts: 10
Topics: 8

PostPosted: Wed Mar 22, 2006 12:43 am    Post subject: how to retrieve 5th row only from a table? Reply with quote

I would like to know the sql query(a single query)to retrieve 5th row only from db2 table.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12360
Topics: 75
Location: San Jose

PostPosted: Wed Mar 22, 2006 5:47 am    Post subject: Reply with quote

siva233,

5th row of what? 5th row as in the row insert sequence of the table or 5th row as in result set

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
siva233
Beginner


Joined: 22 Mar 2006
Posts: 10
Topics: 8

PostPosted: Thu Mar 23, 2006 1:09 am    Post subject: Reply with quote

hi,
Both for inserted sequence and result set
thanks
siva
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12360
Topics: 75
Location: San Jose

PostPosted: Thu Mar 23, 2006 6:42 am    Post subject: Reply with quote

siva233,

You will not able to retrieve based on the insert sequence unless the table has a Rownumber column.

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
siva233
Beginner


Joined: 22 Mar 2006
Posts: 10
Topics: 8

PostPosted: Thu Mar 23, 2006 11:46 pm    Post subject: Reply with quote

kolusu,
what is rownumber column?
thanks
siva
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12360
Topics: 75
Location: San Jose

PostPosted: Fri Mar 24, 2006 7:20 am    Post subject: Reply with quote

Quote:

what is rownumber column?
thanks

siva233,


Search for ROWID in the following link and it will answer your query

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/search?book=dsnsqh11&SHELF=&DT=20010718164132

Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Interview Q & A All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group