Home » SQL & PL/SQL » SQL & PL/SQL » Problem with XMLROOT (Merged)
Problem with XMLROOT (Merged) [message #189212] Wed, 23 August 2006 11:32 Go to next message
alanm
Messages: 282
Registered: March 2005
Senior Member

Hi All,
I run the following sql and get the error as detailed. Can anyone let me know where I am going wrong.

SELECT XMLROOT(XMLType('<poid>143598</poid>'), VERSION '1.0', STANDALONE YES) AS "XMLROOT"
FROM dual
Error at Command Line:1 Column:46
Error report:
SQL Error: ORA-00907: missing right parenthesis

regards

Alan.
Re: problem sql [message #189214 is a reply to message #189212] Wed, 23 August 2006 11:49 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
SQL> SELECT XMLROOT(XMLType('<poid>143598</poid>'), VERSION '1.0', STANDALONE YES) AS "XMLROOT"
  2  FROM dual;

XMLROOT
-----------------------------------------------------------------------------------------------
<?xml version="1.0" standalone="yes"?>
<poid>143598</poid>


What database version do you use?
Re: problem sql [message #189221 is a reply to message #189214] Wed, 23 August 2006 12:09 Go to previous messageGo to next message
joy_division
Messages: 4642
Registered: February 2005
Location: East Coast USA
Senior Member
Also, what tool are you using? Those are not messages from SQL*Plus.
sql issue [message #189258 is a reply to message #189212] Wed, 23 August 2006 17:34 Go to previous messageGo to next message
alanm
Messages: 282
Registered: March 2005
Senior Member

Hi All,
I have the following sql which gives the attached error

SELECT XMLROOT(XMLType('<poid>143598</poid>'), VERSION '1.0', STANDALONE YES) AS "XMLROOT"
FROM dual
Error at Command Line:1 Column:46
Error report:
SQL Error: ORA-00907: missing right parenthesis

can anyone please help out

regards

Alan.
Re: sql issue [message #189267 is a reply to message #189258] Wed, 23 August 2006 22:30 Go to previous messageGo to next message
hobbes
Messages: 173
Registered: January 2006
Senior Member
Which Oracle version are you on? XMLROOT was introduced in 10G Release 2 - on earlier versions you would get this error.

[Updated on: Wed, 23 August 2006 22:33]

Report message to a moderator

Re: sql issue [message #189283 is a reply to message #189267] Thu, 24 August 2006 00:32 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Topics merged.
Previous Topic: variable declaration
Next Topic: Getting only the first returned row from a select query
Goto Forum:
  


Current Time: Thu Dec 08 04:25:11 CST 2016

Total time taken to generate the page: 0.20236 seconds