View previous topic :: View next topic
|
Author |
Message |
royalchm
New User
Joined: 15 Nov 2007 Posts: 29 Location: Bangalore
|
|
|
|
how to retrieve more than one rao from a single select querry.
Thanks in Advance.
HKR |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
royalchm
New User
Joined: 15 Nov 2007 Posts: 29 Location: Bangalore
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|