PS Query & SQL

 View Only
  • 1.  I need help. I think it's a rounding issue. (FA Loan Proration)

    Posted 5 days ago

    Okay, I'm attempting to create a "fall version" and this is UGRD only at the moment to determine what to reduce students to.  I'm not even sure I'm rounding correctly.  But, this is what I'm trying to get the query to do.

    High Offer / #Disb = 550.33333  -->  I want that to round down to 550.

    Then, multiply the (550 * 83 / 100) * 100  (Because they want to see 83 instead of .83).  That comes to 456.5.  --> I want that to round down to 456.

    I'm getting 458.  WHY??????  I've tried replacing ROUND with TRUNC also.

    This is my Expression: 

    (ROUND(B.HIGHEST_OFFER_AMT / COUNT(DISTINCT H.DISBURSEMENT_ID),0)
    *
    (Case

    When
    (SUM(Case
    When F.STDNT_ENRL_STATUS = 'E' AND F.EARN_CREDIT = 'Y' AND F.UNT_PRGRSS_FA > 0
    Then F.UNT_PRGRSS_FA
    Else 0
    END) *COUNT(DISTINCT F.EMPLID || F.ACAD_CAREER || F.INSTITUTION || F.STRM || F.CLASS_NBR)/COUNT(*))
    >= 12
    Then 100

    Else

    (ROUND(SUM(Case
    When F.STDNT_ENRL_STATUS = 'E' AND F.EARN_CREDIT = 'Y' AND F.UNT_PRGRSS_FA > 0
    Then F.UNT_PRGRSS_FA
    Else 0
    END) *COUNT(DISTINCT F.EMPLID || F.ACAD_CAREER || F.INSTITUTION || F.STRM || F.CLASS_NBR)/COUNT(*),0)/12) * 100

    End)/100)

    <scribe-shadow id="crxjs-ext" data-crx="okfkdaglfjjjfefdcppliegebpoegaii" style="position: fixed; width: 0px; height: 0px; top: 0px; left: 0px; z-index: 2147483647; overflow: visible; visibility: visible;"></scribe-shadow>



    ------------------------------
    Dana Pawlowicz
    Business Systems Analyst Sr - ERP
    University of Cincinnati
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------
    Alliance 2026 Recordings are coming soon!


  • 2.  RE: I need help. I think it's a rounding issue. (FA Loan Proration)

    Posted 4 days ago

    You could look at using Floor, Ceiling and Mod to adjust the numbers.

    e.g.

    select  floor(550.33333) from dual;
    select  ceil(550.33333) from dual;
    select  mod(550.33333,1) from dual;

    SELECT
        CASE
            WHEN mod(550.33333,1) <= 0.5 THEN
                floor((550.33333))
            ELSE
                ceil((550.33333))
        END AS roundedValue
    FROM
        dual;


    SELECT
        CASE
            WHEN   mod((550 * 83) / 100,1) <= 0.5 THEN
                floor((550 * 83) / 100)
            ELSE
                ceil((550 * 83) / 100)
        END AS roundedValue
    FROM
        dual;



    ------------------------------
    Daron Wild
    Senior PeopleSoft Developer
    University of Cambridge
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------

    Alliance 2026 Recordings are coming soon!


  • 3.  RE: I need help. I think it's a rounding issue. (FA Loan Proration)

    Posted 4 days ago

    Thanks for the responses.   Even when I was separating it out, I was making the fields the size I wanted so not being very smart about it.

     

    It's working now so I'm happy.    I don't use round, floor, ceil very often so apparently, I need to really focus.  😊  Thanks, Everyone!

     

    Thanks!

    Dana Pawlowicz

    Business Systems Analyst Sr - ERP

    Business Enterprise Systems and Technologies
    Digital Technology Solutions

    University of Cincinnati

    51 Goodman Dr.

    Cincinnati, Oh 45221

     

     




    Alliance 2026 Recordings are coming soon!