SSC-EWI-OR0082
Cannot Convert Nested Type Attribute Expression
Severity
Medium
Description
This error message appears when a query, like a select, tries to access an attribute within a column that was defined as a type. These cannot be automatically converted, but they can be quickly converted by hand.
Example Code:
Input Code Oracle:
CREATE TYPE type1 AS OBJECT (
attribute1 VARCHAR2(20),
attribute2 NUMBER
);
CREATE TYPE type2 AS OBJECT (
property1 type1,
property2 DATE
);
CREATE TABLE my_table (
id NUMBER PRIMARY KEY,
column1 type2
);
INSERT INTO my_table VALUES (
1, type2(type1('value1', 100), SYSDATE)
);
SELECT column1.property1.attribute1, column1.property2
FROM my_table;Output Code:
Recommendations
The code can be manually fixed by changing the '.' accessor for the ':' wherever a type column is being accessed.
If you need more support, you can email us at [email protected]
Last updated
