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!

"missing SELECT keyword" Error during a insert into temp table using blob value

user13259972Dec 3 2015 — edited Dec 3 2015

I am trying to insert into a temp oracle table using select which gets data from a blob field  but I am getting the error -"missing SELECT keyword" .

How do we store temp result in oracle when we are doing this sort of operation ( fetching data from fields and trying to load them in a separate new table on the fly.?

with cte as(

select user_id,utl_raw.cast_to_varchar2(dbms_lob.substr(PREFERENCES))  as my_blob from USER

)

create table  new_table as

SELECT  user_id,EXTRACTvalue(xmltype(e.my_blob),'/preferences/locale') as locale

FROM cte e

----------------------------------------------------------------------------------

Blob data - value- which is

<?xml version="1.0" encoding="ISO-8859-1" ?>

- <preferences>

<timezone>America/New_York</timezone>

<displayscheduleinusertimezone>Y</displayscheduleinusertimezone>

<locale>Spanish</locale>

<dateformat>M/d/yyyy</dateformat>

<timeformat>hh:mm aaa</timeformat>

<longformat>Long_01</longformat>

<doubleformat>Double_01</doubleformat>

<percentformat>Percentage_01</percentformat>

<currencyformat>Currency_01</currencyformat>

</preferences>

This post has been answered by SomeoneElse on Dec 3 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 31 2015
Added on Dec 3 2015
1 comment
589 views