sql question
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: sql question

  1. #1
    Join Date
    Aug 2001
    Posts
    87

    sql question

    Hi,

    I am trying to cretae a query showing my employees salary *0.75
    my request is how to show the new value to the higher 10 real number ,

    for example salary = 1750
    salary * 0.75 = 1312.50

    i need to show the new salary as 1320.

    Regards

    Working together helping each other

  2. #2
    Join Date
    Oct 2002
    Location
    Ljubljana,Slovenia
    Posts
    28
    Try this:

    select salary * 0.75 salary from your_table;
    Aleš Orehek

  3. #3
    Join Date
    Aug 2001
    Posts
    87
    Thanks for your reply

    but if i select salary*0.75 from my table

    salary * 0.75 = 1312.50

    I need to profuce it as 1320

  4. #4
    Join Date
    Aug 2001
    Posts
    87
    Hi,

    I need the experts to put hands please,

    is it too complicated ??

    just want to go up to higer 10 value
    instead of get 1312.20 1320
    1337 1340
    1511 1520
    is it possible


    regards

  5. #5
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    409
    select sal + (10 - mod(trunc(sal), 10)) from
    (select trunc(salary * .75) sal from salary_table)


    HTH.
    -- Dilip

  6. #6
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    or ..
    Code:
    Select
       Round((salary*0.75)+4.9999,-1) sal
    From
       salary_table
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  7. #7
    Join Date
    Aug 2001
    Posts
    87
    slimdave

    this is exactly the one i look for

    thank u all

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width