0

I am trying to fetch XMLType data as a String using commit SCN value as

SELECT ab.userdata.getStringVal() userdata from MINER.MINERT2 ab  as of
scn(1558393) where ab.ID = 14; 

But I am getting SQL syntax error. When I use a normal query, without table alias say

select col from tablename as of scn(1234) where id=1

I do not get any syntax errors.

Anish Sharma
  • 495
  • 3
  • 15

1 Answers1

2

I found the mistake. table alias must be written after as of SCN().

So the query

SELECT ab.userdata.getStringVal() userdata from MINER.MINERT2 ab  as of
scn(1558393) where ab.ID = 14;

must be corrected to

SELECT ab.userdata.getStringVal() userdata from MINER.MINERT2  as of
scn(1558393) ab where ab.ID = 14;
Anish Sharma
  • 495
  • 3
  • 15