Home » Developer & Programmer » JDeveloper, Java & XML » small problem with XMLSerialize
small problem with XMLSerialize [message #458930] Wed, 02 June 2010 11:53 Go to next message
b_52globemaster
Messages: 51
Registered: July 2005
Member
hi,


i want to create a view like this :

 CREATE OR REPLACE FORCE VIEW "FORM_FRSQ"."V_test_XML_L" ("ID", "XMLCONTENT") AS 
  SELECT 1,(

      select XMLSerialize
         (
          CONTENT
           XMLElement
           (
             "projectDetails",
                XMLELEMENT ("projectDetailsTitle",(select 1 from dual) )
           )          
         )
         from dual
  ).getclobval ()

from dual
;





but i'm still obtaining :
Quote:

FROM keyword not found where expected

the error is simple , but having struggling for couple of hours looking for what is missing, any help please !!

and thanks
Re: small problem with XMLSerialize [message #458940 is a reply to message #458930] Wed, 02 June 2010 12:34 Go to previous messageGo to next message
b_52globemaster
Messages: 51
Registered: July 2005
Member
any idea?
Re: small problem with XMLSerialize [message #458946 is a reply to message #458940] Wed, 02 June 2010 12:45 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Be patient, why do you want we answer you in half hour? We don't owe you anything.

When you are waiting for an answer, please read OraFAQ Forum Guide and use SQL*Plus and copy and paste your session.
By the way, SQL*Plus does not like blank lines, so post without them.
In the end, before trying to create a view make your query works:
SQL>   SELECT 1,(
  2        select XMLSerialize
  3           (
  4            CONTENT
  5             XMLElement
  6             (
  7               "projectDetails",
  8                  XMLELEMENT ("projectDetailsTitle",(select 1 from dual) )
  9             )          
 10           )
 11           from dual
 12    ).getclobval ()
 13  from dual
 14  ;
  ).getclobval ()
   *
ERROR at line 12:
ORA-00923: FROM keyword not found where expected

Do you think that "getclobval ()" is a method of a query object (to speak OO language)?

Regards
Michel

[Updated on: Wed, 02 June 2010 13:27]

Report message to a moderator

Re: small problem with XMLSerialize [message #458948 is a reply to message #458946] Wed, 02 June 2010 12:46 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> SELECT 1,(
  2      select XMLSerialize
  3         (
  4          CONTENT
  5           XMLElement
  6           (
  7             "projectDetails",
  8                XMLELEMENT ("projectDetailsTitle",(select 1 from dual) )
  9           )          
 10         )
 11         from dual)
 12  from dual
 13  ;
         1
----------
(SELECTXMLSERIALIZE(CONTENTXMLELEMENT("PROJECTDETAILS",XMLELEMENT("PROJECTDETAILSTITLE",(SELECT1FROMDUAL))))FROMDUAL)
------------------------------------------------------------------------------------------------------------------------
         1
<projectDetails><projectDetailsTitle>1</projectDetailsTitle></projectDetails>

1 row selected.

Regards
Michel
Re: small problem with XMLSerialize [message #458950 is a reply to message #458948] Wed, 02 June 2010 12:51 Go to previous message
b_52globemaster
Messages: 51
Registered: July 2005
Member
Hi Michel

Sorry for my behavior .....,

and thanks a lot.
Previous Topic: Cant connect to 11g database
Next Topic: convert clob into xmltype without a docType
Goto Forum:
  


Current Time: Thu Mar 28 03:54:45 CDT 2024