SSC-EWI-OR0030

KEEP statement used in the aggregate function is not supported

Severity

Medium

Description

This error appears to advertise that the KEEP statement used to indicate that only the first or last values of the aggregate function will be returned is not supported

Example Code

Input Code:

IN -> Oracle_01.sql
SELECT
    department_id,
    MIN(salary) KEEP (
        DENSE_RANK FIRST
        ORDER BY
            commission_pct
    ) "Worst"
FROM
    employees;

Output Code:

OUT -> Oracle_01.sql
SELECT
    department_id,
    MIN(salary)
        !!!RESOLVE EWI!!! /*** SSC-EWI-OR0030 - KEEP STATEMENT USED IN THE AGGREGATE FUNCTION IS NOT SUPPORTED ***/!!!
 KEEP (
        DENSE_RANK FIRST
        ORDER BY
            commission_pct
    ) "Worst"
FROM
 employees;

Recommendations

Last updated