msgbartop
News, views, tips and tricks on Oracle and other fun stuff
msgbarbottom

Producing XML from SQL using cursor expressions

In this post I will show an example of how you can transform a query result into an XML document. I will also show how you can write a query that produces nested or multi-leveled XML document using cursor expressions. (more…)

Filed in Oracle, Tips with 6 Comments | Tags: , ,


CASE gotcha in Oracle 8i

“CASE works with all modern versions…”, that’s what Doug Burns wrote in his excellent article about CASE expressions. I believe that a clarification is needed here, especially for those of you who still deal with Oracle 8i. In Oracle 8i CASE statements and expressions are supported only in SQL and not in PL/SQL. In 8i you cannot use CASE in PL/SQL. Starting with Oracle database release 9.0.1, the SQL and PL/SQL parsers were integrated and, as a result, in version 9.0.1 and above CASE works in both SQL and PL/SQL. Here is an example:

(more…)

Filed in Oracle, Tips with 16 Comments | Tags: , , , ,