Skip to Main Content

Database Software

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-01031 with xmltable

arzammJun 24 2014 — edited Jun 26 2014

Hi all

I got one table and two views


* PREPAQ_MIC  (Primary table)

* VW_DATACRED  (view)

* VW_CNCH_MPIO  (view)

The last view is defined:


CREATE OR REPLACE FORCE VIEW FIRA.VW_CNCH_MPIO

(CDGPROG, CDGEF, CDGMU)

AS

        select CDGPROG, CDGEF, trim(column_value)   CDGMU

              from (    SELECT   CDGPROG, CDGEF, APO.VALORES  CDGMU

                        FROM FIRA.APL_APOYO  APO

                        WHERE CDGPROG = 'CNCH' AND CDGMU = 'VAR'

                        ORDER BY CDGEF, CDGMU

                   ) t,

                   XMLTABLE(('"' || replace(CDGMU, ',', '","') || '"'));

When i try to update the PRE.APOYO (table)  with value from view CNCH.CDGPROG  :

UPDATE  /*+BYPASS_UJVC*/

    (

        SELECT PRE.CLNS,  PRE.CDGCLNS, PRE.CICLO, PRE.CDGCL, PRE.APOYO AS PRE_APOYO, CNCH.CDGPROG AS APOYO_CNCH

            FROM PREPAQ_MIC     PRE,

                 VW_DATACRED    VDC,

                 VW_CNCH_MPIO   CNCH 

            WHERE

                PRE.CLNS = VDC.CLNS AND PRE.CDGCLNS = VDC.CDGCLNS AND PRE.CICLO = VDC.CICLO AND PRE.CDGCL = VDC.CDGCL

                AND VDC.CDGEF = CNCH.CDGEF AND VDC.CDGMU = CNCH.CDGMU

                AND TRIM(PRE.APOYO) IS NULL

    ) SET PRE_APOYO = APOYO_CNCH

Get the error

ORA-01031: Privilegios insuficientes.

Note:  if i execute the select query works fine....

Hope you can helpme

Thanks in advance....

Cheers!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 24 2014
Added on Jun 24 2014
9 comments
3,331 views