Posts tagged: function

Yet another Oracle XML challenge

If you have read my previous tip about Oracle XML API

You would learn to use XML API as nice quick’n’dirty replacement to tons of decode functions.

In this challenge I got on Oracle 9i (yes they still exist in production 2013).

  • We have a string such as ‘123#124#122’, we need to split the different values into record , sort them and map them from a Value-key pair table in an Oralce 9i database.
  • And for reasons of implementation it has to be done in pure SQL, not PL/SQL.
  • and it is best to avoid creating any stored procedures or functions.

A more elaborate description of the problem : Splitting a delimited text with Oracle SQL into records, and sorting them out.

This is a real challenge in the production environment I’m working in.

Read more »