Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Regarding SELECT Querry

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
royalchm

New User


Joined: 15 Nov 2007
Posts: 29
Location: Bangalore

PostPosted: Thu Jan 21, 2010 5:07 pm    Post subject: Regarding SELECT Querry
Reply with quote

how to retrieve more than one rao from a single select querry.
Thanks in Advance.
HKR
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jan 21, 2010 5:21 pm    Post subject:
Reply with quote

rao ?

no idea what a rao is.

and do you mean a singleton select or
a single query (which can be any)?
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Jan 21, 2010 5:22 pm    Post subject:
Reply with quote

Royalchm,

Well, It depends.
If the table has only one row, you will get only one row.
Otherwise you will get more rows based on the condition you have given.

I think you have to elaborate more than this...........

Sushanth
Back to top
View user's profile Send private message
royalchm

New User


Joined: 15 Nov 2007
Posts: 29
Location: Bangalore

PostPosted: Thu Jan 21, 2010 5:30 pm    Post subject:
Reply with quote

I do agree with sushanth. But my question is how we can retrive more than one raw in sigle SELECT at a time. any idea?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jan 21, 2010 5:39 pm    Post subject:
Reply with quote

if rao and raw means ROW
and
sigle = select,
you can't do it in imbedded SQL (part of a program).
the only multiple row access is via a FETCH which involves a defined CURSOR.

tools such as SPUFI, QMF internally build a CURSOR and perform the FETCHs when your SQL is SELECT.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Jan 21, 2010 5:40 pm    Post subject:
Reply with quote

Royalchm,

I think this should work,
Code:
select * from HLQ.tablename
--GET ME 1000 rows;


Code:
Just asking, where are you planning on executing this in SPUFI or in application program.


Thank You,
Sushanth
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jan 21, 2010 8:56 pm    Post subject:
Reply with quote

Hello,

Quote:
I think this should work,

Code:
select * from HLQ.tablename
--GET ME 1000 rows;
Uh, i believe not in a cobol program. . . It will fail if there are more than 1 rows. . .

Possibly Hari will explain what is really needed and take care with the terminology/typing. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Select first 2 group data vice_versa DFSORT/ICETOOL 10 Mon Jun 13, 2016 2:21 pm
No new posts Query to select Null row on priority RahulG31 DB2 24 Thu Jan 21, 2016 5:45 pm
No new posts Can I use sort to select sample recor... Steve Ironmonger DFSORT/ICETOOL 3 Tue Nov 10, 2015 10:02 pm
No new posts Performance issue in the DB2 program ... Pradst57 DB2 19 Mon Oct 12, 2015 8:31 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us