Comments on: Dynamic SQL Pivoting – Stealing Anton’s Thunder Friends of Oracle and Java Wed, 08 Jul 2015 07:37:03 +0000 hourly 1 By: srilag Mon, 21 Nov 2011 09:35:49 +0000 i hav a table of this format:

Id                   Descrip.
1                note1 note2 note3
2                note1 note2 note3
3                note1 note2 note3

i want the output as :

Id                   Descrip.

1                    note1

2                    note1

By: satya Tue, 08 Nov 2011 14:01:45 +0000 Hi,

Many thanks for this excellent code, when i am  using this code with storedproc following error is showing

PL/SQL: ORA-22905: cannot access rows from a non-nested table item

OPEN porec_rpt FOR
      SELECT *
        FROM TABLE
                    (   ‘select * from document’

could you please help


By: Svenka Tue, 01 Nov 2011 18:50:05 +0000 ORDER BY clause in passed query is not being executed. Any ideas why?

By: Olu Thu, 27 Oct 2011 16:13:27 +0000 Hi,
Many thanks for this fantastic piece of work
 I got the same ORA-29913: error in executing ODCITABLEDESCRIBE callout’ err. How may i resolve this.
With best wishes

By: Kannan Sat, 20 Aug 2011 21:33:19 +0000 This is a brilliant piece conceptual explanation and code.  I had a similar  context about , delivering an output of  an arbitrary sql string , using parallel pipelined  functions which accepts a character string as input. I had a tough time to make it parallel as the plsql syntax more or less demanded an input ref cursor for the parallel operation to click , and I had to give it up.

By: Eugene Thu, 11 Aug 2011 15:18:18 +0000 Did you ever figure out the issue with not picking up new column values?

By: DB Wed, 21 Oct 2009 07:33:20 +0000 Great work guys! I used it and it helped a lot..
I got the same ORA-29913: error in executing ODCITABLEDESCRIBE callout’ err,
after digging in a bit I saw it is sensitive to reserved oracle words in the pivot column (the n-1 column). when I changed ‘user’ and ‘rowid’ values into ‘username’ and ‘row_id’ it worked fine.
another thing regarding that n-1 pivot column – can’t extend beyond 30 chars or it will pop the “invalid … ” err.

after fixing those two all I was left with was admiring your nice work.

By: KT Tue, 18 Aug 2009 05:37:26 +0000 Hi,
I tried implementing the code.Even after creating the type PIVOTIMPL,when I run the select statement,i get an error message that PIVOTIMPL is not declared.
Any inputs what could be the reason?

By: SUdarshan Wed, 28 Nov 2007 21:08:26 +0000 I get the error “PLS-00302 SETUROWID must be declared”

when dbms_types.typecode_urowid then
dbms_sql.column_value( self.cur, i, ur1 );
outset.seturowid( ur1 );

By: Patrick Sinke Mon, 25 Jun 2007 15:21:30 +0000 For all you people experiencing problems with the ODCITABLEDESCRIBE callout, you might want to check two things. The number columns are quite strict: a column for the vertical axis, a column for the horizontal axis, and a third one for the result values.
Secondly, I haven’t found a way to parametize the query results, e.g. concatenating a parameter in the query. If you stick to that, it works like a charm!

By: Ionut Wed, 11 Apr 2007 15:13:28 +0000 Hi, Is there a way of getting this to work on oracle 9i? I managed to make it compile somehow but I get the same ‘ORA-29913: error in executing ODCITABLEDESCRIBE callout’ error message when I try to run it.

By: Sudeep Fri, 13 Oct 2006 08:12:20 +0000 It’s nice.

I am getting error while executing as

‘ORA-29913: error in executing ODCITABLEDESCRIBE callout’

By: Marco Wed, 24 May 2006 17:19:38 +0000 Anton, Lucas, did you guys ever tried this by building a dynamic array? Or does this have to many disadvanges?

By: Viliam Wed, 24 May 2006 07:52:19 +0000 Bad luck, it does not compile on 9iR2 we are using :-(

By: Karl r. Wed, 24 May 2006 07:09:39 +0000 Hi,
that’s really a kind o f magic.
now i understand the implementation via interface.
it’s an interface mechanism like in C#; as you must satisfy those oci prefixed interface and then internally in the sql-engine methods of the interfaces are called.
a really interesting approach.