Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Record selection

sanju_joseph
Participant
0 Kudos

Hello Experts,

there is any way by which we can restrict the record of database to be selected , for example if my table have 1000 record and

i am interested in picking record from row 500 to 800 .

Regards,

Sanju

7 REPLIES 7

MarcinPciak
Active Contributor
0 Kudos

Use:

SELECT...UP TO 800 ROWS.

It will result in max 800 hits.

Former Member
0 Kudos

Hello,

I am not sure you can choose rows 500-800 but you could use the UP TO X ROWS clause in the select statement (set X to 800) to retrieve the first 800 rows and then discard the first 499.

Regards,

Steve.

0 Kudos

thanks for the reply,but i am interested at time of selection , and don';t want to do any calcualtion after that

0 Kudos

Hi Joseph,

Set default values to your select-option

Example

Initialization .
S_option-low = 500.
S_option-high = 800.
S_option-sign = 'I'.
S_option-option = 'BT'..

append S_option.

Thanks

Edited by: Always Learner on Oct 17, 2008 10:49 AM

former_member203501
Active Contributor
0 Kudos

hi i think this will happend with setting a flag(a new field) in database table and populate it with X .

regards,

venkat

Former Member
0 Kudos

you can initialise in select-options,

or while writing it you use

loop at itab from 500 to 800.

write:/

endloop.

Edited by: janagar sundaramoorthy on Oct 17, 2008 10:53 AM

0 Kudos

flag option specified by venkat looks good , but the real question is if some new records are inserted in table then flag should

hold the value of the row it is pointing to , don;t know how that

can be done automatically