Formatter error on query with XMLTABLE FLOWR expression

Hi,

I’m getting errors formatting a query that uses XMLTABLE in two cases: (1) DEFAULT namespace is included, (2) FLOWR expression is followed by PASSING clause.

Versions affected: Toad for Oracle 12.6.0.53, 12.1.1.1.

Example:

SELECT *
FROM XMLTABLE (
(xmlnamespaces (DEFAULT ‘dummy’),
‘let $j := /x1
return $j’
PASSING xmltype (‘TEST’)
COLUMNS
col varchar2(10) PATH ‘/’);

Two errors:

[Error] Syntax check (3: 31): ERROR: line 3, column 31, ending line 3, column 37: Found ‘‘dummy’’: A string literal can only follow TIMESTAMP or DATE
[Error] Syntax check (6: 1): ERROR: line 6, column 1, ending line 6, column 7: Found ‘PASSING’: Expecting: ) -or- ,

The lack of replies mean nobody is growing flowrs in Toad? :slight_smile:

No, it just means our formatter guy has probably not checked the boards in a few days… he’s on again/off again but does get to everything listed here.

From: gregb555 [mailto:bounce-gregorborosa@toadworld.com]

Sent: Monday, November 03, 2014 2:56 AM

To: toadoracle@toadworld.com

Subject: RE: [Toad for Oracle - Discussion Forum] Formatter error on query with XMLTABLE FLOWR expression

RE: Formatter error on query with XMLTABLE FLOWR expression

Reply by gregb555

The lack of replies mean nobody is growing flowrs in Toad? :slight_smile:

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

Great, thanks!

I may have missed this post. Anyway, this kind of bugs has high priority and our guys are already looking into it.

Thanks for reporting,

Andre

My team tells me that it should work if you remove the left parenthesis on the 3rd line …

SELECT *

FROM XMLTABLE (

xmlnamespaces (DEFAULT ‘dummy’),

'let $j := /x1

return $j’

PASSING xmltype (‘TEST’)

COLUMNS

col varchar2(10) PATH ‘/’);

Wow, thanks, it works.

P.S. Funny thing is, I had that extra bracket all over the package - and it compiled and worked! Despite the fact that it was syntactically incorrect :slight_smile: