Output Code

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Source Code

Suppose this is the Oracle source code you have migrated:

--Invalid Create Table
CREATE TABLE! table_invalid
(
  col1 VARCHAR2(255 BYTE),
  col2 VARCHAR2!
);

--Create Table (with an error)
CREATE TABLE table1
(
  col1 VARCHAR2(255 BYTE),
  col2 VARCHAR2!
);

--Create View (valid example)
CREATE OR REPLACE FORCE VIEW view1
AS
    SELECT 
        XMLSEQUENCE(1), 
        col1, 
        col2 
    FROM table1;

Output code

-- ** MSC-ERROR - MSCEWI1001 - UNRECOGNIZED TOKEN ON LINE 2 OF THE SOURCE CODE. **
----Invalid Create Table
--CREATE TABLE! table_invalid
--(
--  col1 VARCHAR2(255 BYTE),
--  col2 VARCHAR2!
--)

 --Create Table (with an error)
    CREATE OR REPLACE TABLE PUBLIC.table1 (
      col1 VARCHAR(255),
-- ** MSC-ERROR - MSCEWI1001 - UNRECOGNIZED TOKEN ON LINE 12 OF THE SOURCE CODE. **
--  col2 VARCHAR2!
    );

    --Create View (valid example)
    CREATE OR REPLACE VIEW PUBLIC.view1
    AS
    SELECT
      /*** MSC-ERROR - MSCEWI3016 - FUNCTION RELATED WITH XML NOT SUPPORTED ***/
      PUBLIC.XMLSEQUENCE_UDF('XMLSEQUENCE(1)'),
        col1,
        col2
    FROM
      PUBLIC.table1;

UDF Helpers

CREATE OR REPLACE FUNCTION PUBLIC.XMLSEQUENCE_UDF (INPUT VARCHAR)
RETURNS STRING
LANGUAGE JAVASCRIPT
AS
$$
 return INPUT.concat(' NOT SUPPORTED'); 
$$;

How to interpret the output code?

  • There is one parsing error in line 2. This is because of an invalid token CREATE TABLE!.

  • There is one parsing error in line 5 and line 12. This is because of an invalid tokenVARCHAR2!.

  • There is a not supported function XMLSEQUENCE , which is converted to a XMLSEQUENCE_UDF.

Last updated