You are right, it looks like two statements. You can suppress the blank line by unchecking the option “blank line around function/procedure body”, but I guess you’ll want to keep that option checked. So I modified the behavior to get the following output for the following various cases:

WITH z AS (SELECT u FROM v)

SELECT f

FROM DUAL;

WITH z AS (SELECT u FROM v),

z2 AS (SELECT u2 FROM v2)

SELECT f

FROM DUAL;

WITH FUNCTION f

RETURN NUMBER

AS

BEGIN

RETURN 1;

END;

SELECT f

FROM DUAL;

WITH FUNCTION f

RETURN NUMBER

AS

BEGIN

RETURN 1;

END;

```
FUNCTION f2
RETURN NUMBER
AS
BEGIN
RETURN 1;
END;
```

SELECT f

FROM DUAL;

WITH FUNCTION f

RETURN NUMBER

AS

BEGIN

RETURN 1;

END;

```
z AS (SELECT u FROM v)
```

SELECT f

FROM DUAL;

WITH FUNCTION f

RETURN NUMBER

AS

BEGIN

RETURN 1;

END;

```
FUNCTION f2
RETURN NUMBER
AS
BEGIN
RETURN 1;
END;
z AS (SELECT u FROM v),
z2 AS (SELECT u2 FROM v2)
```

SELECT f

FROM DUAL;

Feel free to comment.

Thanks,

Andre