SSC-EWI-OR0033

PL/SQL declaration in WITH is not supported.

Severity

Medium

Description

PL/SQL declarations in WITH statements are not supported.

Example Code

Input Code:

IN -> Oracle_01.sql
WITH FUNCTION get_domain ( url VARCHAR2 ) RETURN VARCHAR2 IS pos BINARY_INTEGER;
len BINARY_INTEGER;
BEGIN
pos := INSTR(url, 'www.');
len := INSTR(SUBSTR(url, pos + 4), '.') - 1;
END; SELECT aValue from aTable;

Output Code:

OUT -> Oracle_01.sql
// SnowConvert Helpers Code section is omitted.
WITH
     !!!RESOLVE EWI!!! /*** SSC-EWI-OR0033 - PLDECLARATION IN WITH NOT SUPPORTED ***/!!!
 FUNCTION get_domain ( url VARCHAR2 ) RETURN VARCHAR2 IS pos BINARY_INTEGER;
len BINARY_INTEGER;
BEGIN
pos := INSTR(url, 'www.');
len := INSTR(SUBSTR(url, pos + 4), '.') - 1;
END; SELECT aValue from
aTable;

Recommendations

Last updated