• ROUND function has optional third parameter which can specify truncation instead of rounding. This will give you the result you want:

    UPDATE #Analysis

    SET AccMargin = ROUND(Margin/Gallons + Freight/Gallons, 6, 1)

    IDMarginGallonsFreightAccMargin

    10.0502205022-30.180000-0.005999

    20.050220-5022318.260000-0.063383

    If you want to be absolutely sure about retaining precision, CAST/CONVERT every value participating in a formula into DECIMAL(25,13), and subresults also. DECIMAL(25,13) is so called "magical" type (as well as every decimal with p+s=38) because it retains decimal precision after multiplication, division, addition, substraction. That many CAST-s look ugly, but that guarantees you will retain true 13 digits after decimal point, before the final rounding/truncation.

    _____________________________________________________
    Microsoft Certified Master: SQL Server 2008
    XDetails Addin - for SQL Developers
    blog.sqlxdetails.com - Transaction log myths