Oracle Application Express (MOSC)

MOSC Banner

ORA-32034: unsupported use of WITH clause error when using a "with function" sql statement.

edited Dec 10, 2018 4:09AM in Oracle Application Express (MOSC) 2 commentsAnswered

The following code worked in APEX 4.2 but not in 18.1. It now returns the ORA-32034 error.

I've tried it using the "WITH PLSQL" hint as shown here which was the solution provided from ASK Tom but it still returns the error with or without that hint.

return q'~

with /*+ WITH_PLSQL */ function myFunc(interval varchar2) return varchar2

is

daysOfWeek varchar2(100) := '';

begin

  if length(interval) > 0 then

    for i in 1..length(interval)

    loop

      case substr(interval, i, 1)

        when 'S' then

          daysOfWeek := daysOfWeek || 'Sun,';

        when 'M' then

          daysOfWeek := daysOfWeek || 'Mon,';

        when 'T' then

          daysOfWeek := daysOfWeek || 'Tue,';

        when 'W' then

          daysOfWeek := daysOfWeek || 'Wed,';

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center