Aggregator | Books | Industry News | Firefox Plugins | Social | Links

Comments

SQL/XML (SQLX) : Generating XML using SQL - Oracle9i Release 2 includes functionality to support the emerging SQL/XML standard to simplify XML generation from SQL queries.



JonB said...

With the introduction of XQuery in Oracle 10gR2, things got a lot easier:

SELECT XMLQuery(
'
{ for $d in ora:view("DEPT")
return

{ $d }
{ for $e in ora:view("EMP")
where $d/ROW/DEPTNO/text() = $e/ROW/DEPTNO/text()
return

{ $e/ROW/EMPNO,
$e/ROW/ENAME,
$e/ROW/JOB,
$e/ROW/MGR,
$e/ROW/HIREDATE,
$e/ROW/SAL,
$e/ROW/COMM
}

}

}
'
RETURNING CONTENT )
FROM dual
/

Hector said...

it was of help thanks

Jeff said...

The example provided does not show how to include attributes-- this would be helpful. Now I have to go back out into the jungle and find an example that includes them.

Tim... said...

I've added an example with XMLATTRIBUTES to the end of the article.

Cheers

Tim...

Jonathan Fleury said...

Exactly what I needed ! Thanks !

Simon Greener said...

Tim,

I keep coming back to this page of yours. Particularly because your 9i aggregation tip is just such a gem!

Keep up the good work.

regards
Simon

DO NOT ask technical questions here, that's what my forum is for!

These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!

Add your comments here.
Name
Comment
(max 400 chars - plain text)