Skip to Content
avatar image
Former Member

Coding query

Hi experts,

Given below are the sample entries in the table kkrs.

Code firm rate down

90 tata MON 01

90 tata MONTH 01

90 tata LAST 012

90 tata POP 001

90 tata PRE 012

90 tata MON 01

90 tata MONTH 01

90 tata LAST 012

90 tata POP 001

90 tata PRE 012

Now for a particular "firm" (here its tata) if I have to find out those "rate" that differ in the value of "down", how is the code be written for this?

I will reward all the helpful answers.

Thanks,

Ajay.

Edited by: ajay singh on Apr 20, 2008 5:46 PM

Edited by: ajay singh on Apr 21, 2008 6:09 AM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Apr 21, 2008 at 04:16 AM

    Hi,

    select required fields from kkrs into i_kkrs

    where ............

    SORT : i_kkrs by firm rate descending.

    Pls. reward if useful.....

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 21, 2008 at 05:35 AM

    Ajay,

    Select <fields>

    from kirs

    where

    org eq 'tata'

    and <field3> ne <field4>.

    Else u can select all the required fields from the DB table and

    make use of DELET ADJECENT stmnt.

    Reward if usefull

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 21, 2008 at 05:42 AM

    hai ,

    for this purpose,

    select all distinct rate from the table and save in an itab.

    then for each entry in irab ( for each distinct rate ) fetch distinct down from the table.

    if the records count is grater than one that rate varries at down .

    move that rate to itab2.

    regards

    sarath

    Add comment
    10|10000 characters needed characters exceeded