SELECT INTO in WITH marked as error

已完成

In Oracle, you can declare temporary PL/SQL functions in the WITH clause.
If I use a "SELECT INTO" in one of these functions, Datagrip tells me "The INTO clause is not allowed in nested queries."
In fact, it is possible to do so, and it's not an error.

Sample script:
WITH
    FUNCTION F_EXAMPLE
    RETURN NUMBER
    IS
        tmp number;

        BEGIN
            SELECT 42
            INTO tmp
            FROM DUAL;

            RETURN tmp;
        end;
SELECT F_EXAMPLE
FROM DUAL;

0

Hi Alessandrobosio117 

We have a similar issue reported in DBE-19313, but I've created a separate ticket for PL/SQL functions DBE-24409. You can follow it for updates and upvote it (here's how).

0

请先登录再写评论。