Skip to Content
author's profile photo Former Member
Former Member

problem in coding : ranges , plz help

Hi Friends:

Plz see my sample code below:

r_rundate-sign = 'I'.

r_rundate-option = 'EQ'.

r_rundate-low = '20080613'.

r_rundate-high = '20080613'.

APPEND r_rundate.

r_runtime-sign = 'I'.

r_runtime-option = 'EQ'.

r_runtime-low = '153017'.

r_runtime-high = '153042'.

APPEND r_runtime.

SELECT objectclas objectid changenr udate utime

FROM cdhdr

INTO TABLE lit_cdhdr

WHERE objectclas = 'IDENTITY'

and utime IN r_runtime

and udate IN r_rundate.

now the problem is that its picking only one line item while in the table there are 2 line items exists. the problem is that its picking only the data for r_runtime-low. its not picking up data for r_runtime-high. Objectclas is key field while utime & udate are not.

I want to pick both the items from the table. Id I remove the condition of utime from my query, it fetches both the items.Plz help.Points will be rewarded.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jun 16, 2008 at 02:32 PM

    replace EQ with BT when filling "option".

    Thomas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 02:33 PM

    Hello,

    Change the code like follows:

    r_runtime-sign = 'I'.
    r_runtime-option = 'BT'. "Change to between
    r_runtime-low = '153017'.
    r_runtime-high = '153042'.
    APPEND r_runtime.
    

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 02:36 PM

    Hi

    if you fill the ranges

    r_rundate-sign = 'I'.

    r_rundate-option = 'EQ'.

    r_rundate-low = '20080613'.

    r_rundate-high = '20080613'.

    APPEND r_rundate.

    EQ = 'equal', the select check the record with data EQ r_rundate-low.

    change EQ with BT

    BT = between

    r_rundate-sign = 'I'.

    r_rundate-option = 'BT'.

    r_rundate-low = '20080613'.

    r_rundate-high = '20080613'.

    APPEND r_rundate.

    reward if useful, bye

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.