IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Regarding SELECT Querry


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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: 1020
Location: India

PostPosted: Thu Jan 21, 2010 5:22 pm
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
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
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: 1020
Location: India

PostPosted: Thu Jan 21, 2010 5:40 pm
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

Moderator Emeritus


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

PostPosted: Thu Jan 21, 2010 8:56 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Dynamically pass table name to a sele... DB2 2
No new posts SELECT from data change table DB2 5
No new posts Select two different counts from SQL... DB2 6
No new posts Select a DB2 value in a specific deci... DB2 4
No new posts How can I select certain file dependi... JCL & VSAM 12
Search our Forums:

Back to Top