Skip to Content

Record selection

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Oct 17, 2008 at 08:42 AM

    Use:

    SELECT...UP TO 800 ROWS.

    It will result in max 800 hits.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 08:42 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Oct 17, 2008 at 08:43 AM

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

    regards,

    venkat

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 08:52 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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