Skip to Content
avatar image
Former Member

SELECTING DEC 8 2. value from DB ? ( Decimal places contains some value )

There is a table in which one field is of type DEC 8 2.

I have to select all records for which this field can have decimal places( I mean decimal places have some value instead of '00' ).

How to write my SELECT stmt ?

For eg 12.00 , 657.00, 123.12...

I need to SELECT only 123.12 value .

Could you please suggest me how can I SELECT those values in my SELECT stmt ?

Thanks,

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Oct 10, 2007 at 10:38 AM

    I dont think you can restrict this condition in select qery. Better you can fetch all the records into an int table and then delete which have 00 decimals.

    first select all the data in itab.

    data : v_amt type i,

    v_res type i.

    loop at itab.

    v_amt = itab-amt * 100.

    v_res = v_amt mod 100.

    if v_res = 0.

    delete itab.

    endif.

    endloop.

    now it will delete all 00 decimals records from itab.

    regards

    shiba dutta

    Add comment
    10|10000 characters needed characters exceeded