SQL Developer says missing left parenthesis.
ORA-00906: missing left parenthesis 00906. 00000 - "missing left parenthesis" *Cause:
*Action: Error at Line: 8 Column: 108
Oracle SQL
SELECT t.DSA_NAME as "DSA NAME",
t.REVISION as REVISION,
XMLTYPE(t.DSA_SOURCE).EXTRACT('//PreProcessor/statements/text()').getStringVal() AS "PreProcessor Temp Table",
XMLTYPE(t.DSA_SOURCE).EXTRACT('//PostProcessor/statements/text()').getStringVal() AS "PostProcessor Temp Table"
FROM
DSA_SOURCE t
where XMLCAST (XMLTYPE(t.DSA_SOURCE).EXTRACT('//PreProcessor/statements/text()').getStringVal() AS VARCHAR2) like '%create%temp%'
and t.REVISION IN (SELECT MAX(REVISION)
FROM DSA_SOURCE
GROUP BY DSA_NAME);
I have tried using VARCHAR2(100)
instead of VARCHAR
in CAST function, but then I am getting below error.
ORA-00932: inconsistent datatypes: expected - got - 00932. 00000 - "inconsistent datatypes: expected %s got %s" *Cause: *Action: