Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00932: inconsistent datatypes: expected - got CLOB

Rajneesh S-OracleFeb 14 2020 — edited Feb 17 2020

Hello All,

If I use NULLIF function for CLOB field, I am facing ORA-00932 error as below:

with T1 as (

select

(

SELECT

         RTRIM(XMLCAST(

                    XMLAGG(

                            XMLELEMENT(E,'                 '||x.column\_name||' as '||x.column\_alias,','||chr(10))

                             ORDER BY ORD\_POS

                           ) AS CLOB

                ),','||CHR(10))

FROM XMLTABLE (

      '/functionalView/columns/column'

      PASSING A.VIEWDEF

      COLUMNS

        ORD\_POS FOR ORDINALITY,

        COLUMN\_NAME  VARCHAR2(30) PATH '@name',

        COLUMN\_ALIAS VARCHAR2(30) PATH '@columnAlias'

    ) X

) SELECT\_CLAUSE

FROM XML_DATA A

WHERE ROWNUM=1

)

SELECT

nullif(select_clause,'COL1')

from T1;

pastedImage_0.png

However above sql is working fine without nullif function as below:

with T1 as (

select

(

SELECT

         RTRIM(XMLCAST(

                    XMLAGG(

                            XMLELEMENT(E,'                 '||x.column\_name||' as '||x.column\_alias,','||chr(10))

                             ORDER BY ORD\_POS

                           ) AS CLOB

                ),','||CHR(10))

FROM XMLTABLE (

      '/functionalView/columns/column'

      PASSING A.VIEWDEF

      COLUMNS

        ORD\_POS FOR ORDINALITY,

        COLUMN\_NAME  VARCHAR2(30) PATH '@name',

        COLUMN\_ALIAS VARCHAR2(30) PATH '@columnAlias'

    ) X

) SELECT\_CLAUSE

FROM XML_DATA A

WHERE ROWNUM=1

)

SELECT

select_clause

from T1;

pastedImage_1.png

If I replace xmlagg as clob to listagg then there is no issue as below:

with T1 as (

select

(

select listagg(x.column\_name||' as '||x.column\_alias, ', ') within group (order by ord\_pos)

from xmltable (

      '/functionalView/columns/column'

      passing a.viewdef

      columns

        ord\_pos for ordinality,

        column\_name  varchar2(30) path '@name',

        column\_alias varchar2(30) path '@columnAlias'

    ) x

) select\_clause

FROM XML_DATA A

WHERE ROWNUM=1

)

SELECT

nullif(select_clause, 'col1')

from T1;

pastedImage_2.png

I want to use xmlagg as CLOB only and is there a way that I can manage error due to nullif clause.

Thanks,

Rajneesh

This post has been answered by Paulzip on Feb 14 2020
Jump to Answer

Comments

4137610

Hello,

Any insights on this?

Thank you.

4137610

Any insights?

Sandeep Kumar sk

Check this connector guide for OUD section 5.4. (Reconciling OUD Groups Under One Organization in Oracle Identity Manager)

Note: Oracle Identity Governance 12c PS3 supports most of the Oracle Identity Manager 11g connectors through CI-based implementation. The above link is for CI-based implementation.

Srinath Menon-Oracle

This requirement can be done only by Trusted mode of roles/groups reconciliation but this functionality is not supported with OUD Connector as in reconciling OUD groups (and memberships) as roles to OIM .

4137610

Thank you Sri.

Tend to agree with this.  We also noticed it may need a ".Trusted" keyword in the Configuration Lookup value of 'DSEE Server' IT Resource (meaning, "Lookup.LDAP.OUD.Configuration.Trusted") for this to operate.  However was not sure like if that configuration was supported.

Is there no way to reconcile OUD Groups into a fresh new vanilla OIG environment as OIG Roles?

We don't need to actually engage OUD as well.  Since our end goal to do a migration from OIM 11g to OIG 12c.  Thus will it be better to use UserManagement / RoleManagement APIs to get all Users, Roles and Organizations from OIM 11g and push them into OIG 12c using APIs.  We don't need to migrate user's Passwords - since OAM (SSO login) will be used for login to OIG eventually.

Thank you.

Srinath Menon-Oracle
Answer
Is there no way to reconcile OUD Groups into a fresh new vanilla OIG environment as OIG Roles?

In the current system OOTB there is no way to achieve this.

Marked as Answer by 4137610 · Sep 27 2020
1 - 6

Post Details

Added on Feb 14 2020
12 comments
45,570 views