I am using Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
I have existing table for eg.: my_scheme.my_existing_table I can select and see data from this table.
But when I try read data from this table using XMLQuery:
SELECT XMLQuery(
'for $i in fn:collection("oradb:/my_scheme/my_existing_table")/content/text()
return $i'
returning content
)FROM DUAL;
Oracle generates the error:
ORA-00942: table or view does not exist
Maybe someone is missing some rights. Please advise me how to solve this problem.
For example, you have a table
T
:Your query should be like this:
ie
fn:collection()
parameter should be"oradb:/SCHEMA/TABNAME"
and then you should specify/ROW/COLNAME
where/ROW
before column name is mandatory.In fact, if that's really what you want, you don't need
for
:Though I would concatenate those values with
,
, like this:Or a couple of variants for all columns from T: