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 

DB2 - Query

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Rajkannan
Beginner


Joined: 02 Jun 2004
Posts: 64
Topics: 31

PostPosted: Wed Jun 02, 2004 10:08 am    Post subject: DB2 - Query Reply with quote

I am facing problem in reteriving data.

The scenario is I need to retrieve first 5 rows of a field(column) and concatenate them into a single column and then insert that single column.

Could you please tell me how can I retrieve 5 rows of a coulmn without using a cursor

Thanks in advance
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Jun 02, 2004 10:13 am    Post subject: Reply with quote

Rajkannan,

None of the programming languages on the mainframe support multiple values for a host variable. How is the column defined? Is it a numeric field or a character field?

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


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Wed Jun 02, 2004 12:29 pm    Post subject: Reply with quote

Quote:

Could you please tell me how can I retrieve 5 rows of a coulmn without using a cursor


If you dont want to use a Cursor , you can execute your Singleton Select 5 times to retrieve the 5 Rows.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database 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