Home Forums SQL Server 2008 SQL Server Newbies Recalculate Wages (Reposted for SQL 2008 with additional columns) RE: Recalculate Wages (Reposted for SQL 2008 with additional columns)

  • Chris,

    I did correct the data and ran the updated query as provided by you. I am still getting the rounding error. For example, I changed a few hours and rate to test it. Below is the result. The last column for EmpID 100 is 1000.01 and the last column for EmpID500 is 3000.01. Thanks

    EmpIDEarningCodePayPerPeriodEQHourlyRateHoursWorkedAmountDeptnRatenAmountNewRateNewAmount

    100Holiday100011.538520200SALES9.3406186.819.3406186.81

    100Jury Duty100011.538510100SALES9.340693.419.340693.41

    100Regular100011.538510100SALES9.340693.419.340693.41

    100Sick100011.538530300SALES9.3406280.229.3406280.22

    100Vacation100011.538510100SALES11.5385115.3911.5385115.39

    100Vacation100011.538520200MKT11.5385230.7711.5385230.77

    200Regular150017.3077181500ADMIN17.30771500NULL1500

    300Holiday200023.076920645.16ACCT23.0769153.85NULL645.16

    300Regular200023.076920645.16ACCT23.07691692.31NULL645.16

    300Sick200023.076922709.68ACCT23.0769153.84NULL709.68

    400Regular250028.8462731754.81HR23.99171751.423.99171751.4

    400Regular250028.846230721.16ADMIN23.9917719.7523.9917719.75

    400Vacation250028.8462124.04HR28.846228.8528.846228.85

    500Regular300034.615410937.5ADMIN34.6154937.5192.30761923.08

    500Sick300034.61542187.5ACCT18.0137187.5192.3076384.62

    500Vacation300034.6154201875HR34.6154187534.6154692.31