Rounding - Always Round Up

Hi All,
Is there a way in T-SQL using the round command to always round up regadless of the value.
For example:ROUND(normal_hours * pay_rate * 52, - 3) AS Expr3
normal_hours = 36
pay rate = 23.64
weeks in year = 52
(36 * 23.64) * 52 = 44,254.08
It rounds to 44,000. I want 45,000.  Is this possible. Am I overlooking the obvious?
Thanks in Advance and Happy Holidays!!!!!!!!Adam

USE CoreDB
GO
--================================================================================
--Name:  TIM SMOLKA
--Date:  2014.08.05
--Description:  Round factional pennies
--================================================================================
CREATE FUNCTION FN_ROUND_UP_PENNY
@AMOUNT DECIMAL(18,6)
RETURNS DECIMAL(18,2)
AS
--DECLARE @AMOUNT DECIMAL(18,6) = 1560891.00015445 
BEGIN
DECLARE @RV DECIMAL(18,2)
DECLARE @FACTOR INT = 100
DECLARE @TMP DECIMAL(18,6) = (@AMOUNT * @FACTOR)
SELECT @RV = CEILING(@TMP) / @FACTOR
--SELECT @RV
RETURN @RV
END

Similar Messages

  • Always Round Up

    I am trying to find a way to always round up to the next whole number. For example if I have 2.08 I need it to return 3. If I try this SELECT ROUND(2.08) FROM DUAL; it rounds to 2. I am using Oracle 11g. Any help would be appreciated. Thank you.

    Hi,
    sb92075 wrote:
    add 0.5 before applying ROUND() function
    Please do no use that!
    with t as
        (select 2.08 num  from dual union all
         select 2.00 num  from dual
    select
      num
      ,CEIL(NUM)          CEIL_NUM
      ,ROUND(NUM + 0.5)   ROUND_NUM
    FROM
      T
    NUM  CEIL_NUM ROUND_NUM
    2.08         3         3
       2         2         3 Regards,
    Peter

  • Always round up to nearest whole in APO DP

    Hi
    there is a requirement to always round up data to nearest whole number. number should be always rounded above and not rounded down.
    Example a value of 0.07 should be rounded to 1
    a value of 1.25 should be rounded to 2
    a value of 1.75 should be rounded to 2
    a value of 1.07 should be rounded to 2
    and so on
    Is there a way i can achieve in APO DP by some settings/paramater/config/macro/exit etc etc - i am on SCM 7.0
    Thanks,
    TJ

    Tejinder
    Try using the CEIL() function in a macro.
    Rishi Menon

  • Always round up or down

    Hallo,
    I´m looking for a function in DIAdem to always round up or down. I build myself some but they are old and slow... and they also work only almost perfect, some cases Just wont work right.
    The aim is to round figures to 1/100, 5/100, 1/10, 5/10, to numbers, X mod 5 = 0, to x mod 10 = 0, to x mod 50 = 0 and so on.
    I want to use it for scalling Report-Diagramms automatically, but with fixed and round scales - also for same scales of one meassurement in different Messures.
    Therefor i need the funktion to Round Up always or in Minus Round down always.
    If someone has a nice Solution for it i would be very thankfull.
    Thanks already for ur surport.
    STG

    I'm not sure I fully understand the question, but hopefully this helps:
    Frac = Return decimal portion of a number
    Trunc = Return Integer portion of a number
    intMyResult = Frac(Pi)    'intMyResult = 0.14159265358979
    intMyResult = Trunc(-75.5109) 'intMyResult = -75
    So a combination of these could give you:
    Always Round Up:
      If Frac(Val) > 0 then MyResult = Trunc(Val) + 1
    Example:
      Var =Pi
      If Frac(Var) > 0 then
        MyResult = Trunc(Var) + 1
      Else
        MyResult = Var '4
      end if
    Always Round Down:
      MyResult = Trunc(Val)
    Example:
      Var =Pi
      MyResult =Trunc(Var) '3
    You can also combine this with multiplying&dividing by 10/100/1000 to round to specific numbers of decimal places
    Example:
      Var =10.12345
      Var = Var *100
      Var =Trunc(Var)
      Var = Var /100
      MyResult = Var  '10.12
    -Josh
    Engineering Technician
    John Deere Power Systems

  • JMOD condition type value should be always rounded up instead of commercial

    Hi Helpers,
    I need one clarification from you all based on your expertise,
    1. JMOD condition type value should be always rounded up instead of commercial.
    2. i have been already made rounding up in the condition type JMOD in the transaction V/06. but unfortunatly not working.
    3. after that we found that there is configuration change in spro (company code setting in the indai taxation-CIN) in the Logistic general> tax on goods movement>india> basic setting> company code setting for the commercialrounding, but the same is  already ennabled with SD rounding IND.
    Need your expertise on this.How shall we make it round up always for JMOD condition value. below is an example for your further analysis.
    Example: if values UTXJ is : 8,913.40 and JMOD will be calculated based on UTXJ as 10% thats is 891.34.
    Actually this should be 892 as per the requiremen.t

    I just recently rolled off a project in Europe that had an issue similar to this.  We were having rounding issues as a result of %  discounts. 
    However, we did come up with a solution that is provided by SAP. 
    Please review OSS note 80183 on SAP rounding and the solutions provided within the note.
    I hope this helps.
    Kind Regards,
    Jason

  • So my Ipod touch hasn't been connecting to computer, or charging for a week or two until i turn it off completely and now i try to reset all content and setting, the circle goes round and round for like hrs(24) and it still does not complete the reset

    so my Ipod touch hasn't been connecting to computer, nor charging for a week or two until i turn it off completely and now i try to reset all content and setting,(thinking it may connect to the computer and itunes and also charge) but the circle goes round and round for like hrs(24) and it still does not complete the reset.
    pls pls pls pls help .
    i have tried alot of solutions, but non of them have worked.

    Have you tried walking it into the nearest Apple Store and asking for assistance there...?
    I'm guessing you don't have Apple Care on it.

  • I'm trying to update my apps using the creative cloud desktop app. I can't see any apps in the app tab, the wheel just spins round and round and nothing happens. Has anyone got any ideas? I've tried uninstalling the desktop app and reinstalling but it sti

    Hi
    I'm trying to update my apps using the creative cloud desktop app. I can't see any apps in the app tab, the wheel just spins round and round and nothing happens. Has anyone got any ideas? I've tried uninstalling the desktop app and reinstalling but it still has the same problem.
    Cheers
    Rachel

    Hi Rachel,
    You can follow the article: App doesn't open | Progress wheel spins continually to get your issue fixed.
    Let us know if the issue still persists or not.
    Regards,
    Ratandeep Arora

  • HT1414 Itunes just goes round and round when i tap on recent purchases and cant get at recent songs purchased on my non apple laptop. I don't connect my iPad to a computer. How do I tackle this?

    When I open iTunes on my iPad and tap on purchased for music, the timer just goes round and round and won't find my purchased tunes and I can't therefore download any new items I have bought. Any suggestions on how to reload the software?

    Make sure you have a good wifi connection.
    Make Sure iOS is updated to the latest version
    Reboot the device by pressing and holding down the home and sleep/wake buttons (power) at the same time until the apple logo appears on the screen, then let go.
    If that doesn't work then reset the device by going to settings/general/reset/reset all settings

  • Went to use my ipad tonight and the screen is blank except for a little circle going round and round and I ccant switch the device off

    Went to use my ipad tonight and the screen is black with just a small circle in the middle going round and round.  I thought i would switch it off but it wont let me do that either.  HELP

    Try a soft-reset : press and hold both the sleep and home buttons for about 10 to 15 seconds, after which the Apple logo should appear and it should reboot - you won't lose any content, it's the iPad equivalent of a reboot.

  • How do i cancel after the circles of hell go round and round?

    I have been in the circles of hell trying to cancel my subscription which my credit card, i was surprised to learn, had been charged for- only to find it is already cancelled! See below
    Adobe ExportPDF, Annual
    Cancelled: Effective February 2, 2016
    Restart
    But I have just been billed for it anyway. And probably be billed for it in another year - 2016. And then it will probably "automatically" (see fine print) restart.and so on till i am very very old. interesting to see on other posts that cancelling the credit card does not help which seems odd but then again after two hours of wandering round and round the site (love the hilarity of the non-functioning chat icon - much hilarity every Christmas in the accounting department.) I'm not surprised. It is clear that adobe has one of the most difficult "unsubscribes" online. Despite the professionals hunting them down and killing them, there are still websites devoted to the topic of why can't I unsubscribe and why is this so hard and surely this is illegal. Adobe clearly makes most of its money out of the unsubscribe because the two products I bought didn't work anyway. Fair enough, should have known, but remind me to employ a lawyer in future before even opening an adobe document.

    Hi there,
    Sorry for the frustrating experience, looking at the account I could see the billing has been stopped for the subscription and you will continue to have the access to software till 2016.
    Please update this thread if you would like to cancel the subscription and get refund.
    ^Ani

  • Can't access my files, the circle thing keeps going round and round

    I can't access my files, the little cursor thing keeps going round and round, is there a way to by pass that or is my powerbook going dead

    What version of OS X are you running?
    Useful article here on the causes of the Spinning Beach Ball and how to troubleshoot it:
    http://www.computerworld.com/s/article/9177479/Troubleshoot_the_spinning_beach_b all?taxonomyId=89&pageNumber=1
    and also this:
    http://www.thexlab.com/faqs/sbbod.html

  • Hey! I don't know if my MacBook Air is frozen, but the screen is gray with the apple logo and an icon below turning round and round as if it's opening, but has been like that for a few days. I've switched it off and then on again several times, still the

    Hey
    I don't know if my mac book air is frozen, but the screen is gray with the apple logo in the middle of the gray screen, with the 'booting' icon turning round and round. I have switched it off fron both the power and power button on the computer, it goes off, when I put it on, same screen comes on again. Help Please!

    Take each of these steps that you haven't already tried. Stop when the problem is resolved.
    Step 1
    The first step in dealing with a boot failure is to secure your data. If you want to preserve the contents of the startup drive, and you don't already have at least one current backup, you must try to back up now, before you do anything else. It may or may not be possible. If you don't care about the data that has changed since your last backup, you can skip this step.   
    There are several ways to back up a Mac that is unable to boot. You need an external hard drive to hold the backup data.
         a. Boot into the Recovery partition, or from a local Time Machine backup volume (option key at startup.) When the OS X Utilities screen appears, launch Disk Utility and follow the instructions in this support article, under “Instructions for backing up to an external hard disk via Disk Utility.”
    b. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, boot the non-working Mac in target disk mode. Use the working Mac to copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    c. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.
    Step 2
    Sometimes a boot failure can be resolved by resetting the NVRAM.
    Step 3
    If you use a wireless keyboard, trackpad, or mouse, replace or recharge the batteries. The battery level shown in the Bluetooth menu item may not be accurate.
    Step 4
    If there's a built-in optical drive, a disc may be stuck in it. Follow these instructions to eject it.
    Step 5
    Press and hold the power button until the power shuts off. Disconnect all wired peripherals except those needed to boot, and remove all aftermarket expansion cards. Use a different keyboard and/or mouse, if those devices are wired. If you can boot now, one of the devices you disconnected, or a combination of them, is causing the problem. Finding out which one is a process of elimination.
    If you've booted from an external storage device, make sure that your internal boot volume is selected in the Startup Disk pane of System Preferences.
    Step 6
    Boot in safe mode. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Post for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    When you boot in safe mode, it's normal to see a dark gray progress bar on a light gray background. If the progress bar gets stuck for more than a few minutes, or if the system shuts down automatically while the progress bar is displayed, your boot volume is corrupt and the drive is probably malfunctioning. In that case, go to Step 6.
    If you can boot and log in now, empty the Trash, and then open the Finder Info window on your boot volume ("Macintosh HD," unless you gave it a different name.) Check that you have at least 9 GB of available space, as shown in the window. If you don't, copy as many files as necessary to another volume (not another folder on the same volume) and delete the originals. Deletion isn't complete until you empty the Trash again. Do this until the available space is more than 9 GB. Then reboot as usual (i.e., not in safe mode.)
    If the boot process hangs again, the problem is likely caused by a third-party system modification that you installed. Post for further instructions.
    Step 7
    Launch Disk Utility in Recovery mode (see Step 1.) Select your startup volume, then run Repair Disk. If any problems are found, repeat until clear. If Disk Utility reports that the volume can't be repaired, the drive has malfunctioned and should be replaced. You might choose to tolerate one such malfunction in the life of the drive. In that case, erase the volume and restore from a backup. If the same thing ever happens again, replace the drive immediately.
    This is one of the rare situations in which you should also run Repair Permissions, ignoring the false warnings it may produce. Look for the line "Permissions repair complete" at the end of the output. Then reboot as usual.
    Step 8
    Reinstall the OS. If your Mac was upgraded from an older version of OS X, you’ll need the Apple ID and password you used to upgrade.
    Step 9
    Repeat Step 6, but this time erase the boot volume in Disk Utility before installing. The system should automatically reboot into the Setup Assistant. Follow the prompts to transfer your data from a Time Machine or other backup.
    Step 10
    This step applies only to older Macs (not current models) that have a logic-board ("PRAM") battery. Both desktop and portable Macs used to have such a battery. The logic-board battery, if there is one, is separate from the main battery of a portable. A dead logic-board battery can cause a boot failure. Typically the failure will be preceded by loss of the settings for the startup disk and system clock. See the user manual for replacement instructions. You may have to take the machine to a service provider to have the battery replaced.
    Step 11
    If you get this far, you're probably dealing with a hardware fault. Make a "Genius" appointment at an Apple Store, or go to another authorized service provider.

  • Just updated to Yosemite and now can't open mail, or finder or others.  That wheel,just goes round and round

    i just updated to Yosemite and now can't open mail or finder or other apps.   Wheel just goes round and round

    I just uninstalled it and am waiting for it to reinstall. I sincerely hope that I have not lost everything that I worked on so hard. Now that mobile me is gone, I have not been able to go between devices to transfer things. I was merely trying to take a document I had worked on and open it in pages, but it said my version was too old. When I updated, it wouldn't load. Now I cannot do anything. I hope that the reinstall fixes it without losing everything. Please advise!!! Yes, I am in panic mode.

  • I am having problems shutting down my MacBook Pro.  I go to the apple and click shutdown or restart, it appears the shutdown process starts, the screen goes blue and the little circle keeps going round and round, but nothing happens even after 30 minutes.

    I am having problems shutting down my MacBook Pro.  I go to the apple and click shutdown or restart, it appears the shutdown process starts, the screen goes blue and the little circle keeps going round and round, but nothing happens even after 30 minutes.

    Make sure you quit all your applications before shutting down.
    And try resetting the SMC.
    Intel-based Macs: Resetting the System Management Controller (SMC)

  • I want to cancel my subscription and I'm just being taken round and round in circles and Im not happy

    i want to cancel my monthly subscription and I'm being taken round and round in circles.

    Hi there
    I see your plan has now been cancelled but please let us know if you require any further assistance.
    Kind regards
    Bev

Maybe you are looking for