<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0">

  <channel>
    <title>Ren&#233; Nyffenegger on Oracle</title>
    <link>http://www.adp-gmbh.ch/</link>
    <description>
      Hello! I am Ren&#233; Nyffenegger and this is the site where I write articles on Oracle. I hope that, if time permits and I am not
        on holidays, I can write at least one article per week. 
    </description>
    <language>en-en</language>
    <copyright>Copyright 2005 Ren&#233; Nyffenegger</copyright>
    <lastBuildDate>Sat, 14 Nov 2009 11:10:00 GMT</lastBuildDate>

    <item>
      <title>On DAO and ODBC with Oracle</title>
      <description><p>Here are a few notes on DAO and ODBC with Oracle</p>
        </description>
      <pubDate>Sat, 14 Nov 2009 11:10:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2009/11/14.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On XML Queries</title>
      <description><p>
    I've been playing with Oracle's implementation for XQueries recently. Here are a few queries to demonstrate some features of XQueries. By no means are they complete, but they're
    meant to give a quick overwiev on some possibilities.
        </p>
        </description>
      <pubDate>Thu, 08 Oct 2009 15:15:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2009/10/08.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On summing up values in nodes of a hierarchical query</title>
      <description><p>
          Summing up nodes in a hierachical query.
        </p>
        </description>
      <pubDate>Tue, 29 Sep 2009 22:08:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2009/09/29.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On including files in SQL*Plus</title>
      <description><p>
          How to include files in SQL*Plus...
        </p>
        </description>
      <pubDate>Sat, 15 Mar 2008 22:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2008/03/15.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On setting commit_write</title>
      <description><p>
          Recently, I had a company call me because they had a performance problem. After inquiring how that problem manifested itself, they told me that they needed to update an application with lots of data to a newer relase and that
          they used a "tool" that migrated that data. The estimates for this tool to complete the migration amounted to some 90 hours, which was too long, because it should be completed during a weekend. So, I went to see
          them to investigate that problem....
        </p>
        </description>
      <pubDate>Tue, 11 Mar 2008 22:00:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2008/03/11.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On forcing a nested loop join instead of a hash join"</title>
      <description><p>
           I have two tables that I want to join with a nested loop (instead of a hash join).
        </p>

        </description>
      <pubDate>Thu, 17 Jan 2008 00:01:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2008/01/17.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>Jobs at ADP</title>
      <description><p>
          Although I usually write on Oracle here, this time, I have to use this channel because I am looking for some employees (or freelancers, although we prefer employees).
        </p>

        </description>
      <pubDate>Sun, 29 Jul 2007 19:00:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/jobs.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>Emulating tables with PL/SQL (Part III)</title>
      <description><p>

    With PL/SQL, it's possible to create functions that return a <i>nested table</i> type of an <i>object type</i>. If the return value of such a function is given as the argument to 
    the <a href='http://www.adp-gmbh.ch/ora/sql/table_cast.html'>table()</a> operator, it behaves like an ordinary table. I have already written about this in
    <a href='http://www.adp-gmbh.ch/blog/2006/01/08.html'>On emulating tables with nested tables</a> and <a href='http://www.adp-gmbh.ch/blog/2006/03/24.php'>On emulating tables with PL/SQL (Part II)</a>. 

    In these examples, the structure of the returned table (that is: the column names and their <a href='http://www.adp-gmbh.ch/ora/misc/datatypes/index.html'>datatypes</a>) is fixed. However, it is possible
    to create a function that returns a table whose data types and column names are constructed dynamically. This article tries to discuss this.

        </p>

        </description>
      <pubDate>Sun, 22 April 2007 10:45:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2007/04/22.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>sprintf and printf in PL/SQL</title>
      <description><p>There are a few things in PL/SQL that I am <i>really</i> missing. One of these things is <code>printf</code>. I am not aware of any built-in functionality that remotely resembles the elegance of printf. Ok, 
    <a href='http://www.adp-gmbh.ch/ora/sql/rpad.html'>lpad and rpad</a> and <a href='http://www.adp-gmbh.ch/ora/sql/to_char.html'>to_char</a> come to mind. But these functions are ,<i>IMHO</i>, tedious to use, especially when it
    comes to handling <a href='http://www.adp-gmbh.ch/ora/misc/null.html'>null values</a>. 
    </p><p>

          Therefore, I have <i>hacked up</i> my own printf.
        </p>

        </description>
      <pubDate>Sat, 14 April 2007 08:15:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2007/04/14.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On importing data from Oracle into Excel with CopyFromRecordset</title>
      <description><p>
            In my <a href="http://www.adp-gmbh.ch/blog/2007/01/24.php">last blog entry</a>, I have written a little Excel macro. This macro opens a connection to an Oracle database, issues a select statement
               and then <i>iterates</i> over each record within the result set. For each record, it also <i>iterates</i> over each attribute within this record.
               </p><p>
               Now, there is <b>CopyFromRecordset</b> which does this iteration. I only have to specify the top left cell where I want my result set to appear. 
        </p></description>
      <pubDate>Thu, 01 February 2007 19:45:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2007/02/01.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On importing data from Oracle into Excel with a Visual Basic for Application macro</title>
      <description><p>
         I have been playing with Excel and its Visual Basic for Application (VBA) macros recently. As much as I loathe the syntax of VBA, I <i>do</i> like what can be done with it. Especially, I found it quite easy to connect to an
         Oracle Database with <i>ADODB</i>, execute a select statement and import the result into an Excel worksheet. Let me share my joy with you...
        </p></description>
      <pubDate>Wed, 24 January 2007 22:00:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2007/01/24.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On finding changed values in a table with flashback</title>
      <description><p>
          The as of clause in a select statement allows to see the data as of a past SCN or past point in time. So, it's possible, for example, to compare the current data in a table with a previous data set. This is what I try to do in this article.
        </p></description>
      <pubDate>Sun, 31 December 2006 11:45:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/12/31.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On parametrizing views with contexts</title>
      <description><p>
          Contexts allow to paramtrize a view. This article discusses how.
        </p></description>
      <pubDate>Sat, 3 December 2006 13:10:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/12/03.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On creating an AJAX Application with Oracle</title>
      <description><p>
             With the PL/SQL gateway, it's possible to invoke PL/SQL procedures via HTTP (or a browser, for that matter) and to return HTML pages to the browser. Since AJAX seems (or at least seemed) to be quite popular at the moment, I decided to find out if it is 
             possible to create an AJAX web application with the PL/SQL gateway. To make the story short: it is. In this article, I am going to show how I did it. I used Oracle Express Edition 10 (Oracle XE) on Windows more or less out of the box.
        </p></description>
      <pubDate>Thu, 30 November 2006 9:10:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/11/30.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>Beware of NOT IN and NULLS</title>
      <description><p>
                Beware of select statemenst with a NOT IN where NULLs are part in the NOT IN clause.
        </p></description>
      <pubDate>Wed, 29 November 2006 03:10:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/11/29.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On splitting a string into words with regular expressions</title>
      <description><p>
             With <a href='http://www.adp-gmbh.ch/ora/sql/re/index.html'>Oracle's regular expressions</a>, it's relatively easy to split a string into 
             it's words. Easy, <i>that is</i>, compared with a solution that doesn't use 
             <a href='http://www.adp-gmbh.ch/ora/sql/re/regexp_substr.html'>regexp_substr</a>. 
             It <i>still</i> requires some amount of setup as the following steps show...
              </p></description>
      <pubDate>Sun, 20 August 2006 21:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/08/20.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On generating HTML output with SQL*Plus</title>
      <description><p>
              SQL*Plus generates HTML output if it is invoked with the <b>-m</b> flag.
              </p><p>
                This article is going to demonstrate that.        
              </p></description>
      <pubDate>Sat, 19 August 2006 12:15:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/08/19.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On out parameters</title>
      <description><p>
    I have recently stumbled upon something, which, after some thinking about, makes <i>partially</i> sense. The corpus delicti is a procedure
    that has an <b>out</b> parameter.
    </p></description>
      <pubDate>Sun, 13 August 2006 12:50:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/08/13.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>Comments, finally!</title>
      <description><p>
    Until now, my blog wasn't a <i>real</i> blog because there was no possibility to leave a comment to a posting. I have changed that now: from now on,
    there will be such a possibility.
    </p></description>
      <pubDate>Sun, 04 June 2006 15:45:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/05/09.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On travelling back in time with Oracle's Workspace Manager</title>
      <description><p>
          Oracle's <a href='http://www.adp-gmbh.ch/ora/workspace_manager/index.html'>Workspace Manager</a> allows to travel back in time, so to speak, to see
    the data of that point in time to which one travelled. This is posslble because the Workspace Manager keeps different versions
    of data (See <a href='http://www.adp-gmbh.ch/blog/2006/05/07.php'>On creating workspaces and merging/refreshing data with Oracle's Workspace Manager</a>).
     </p><p>
       In this article, I want to demonstrate how this is done.
        </p></description>
      <pubDate>Mon, 16 May 2006 22:45:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/05/16.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On solving workspace conflicts</title>
      <description><p>
             On May 7th, I demonstrated how data can be versioned in workspaces and then be
             merged or refreshed. This worked well as long as I didn't change the same row
             in two different workspaces. However, when the same row is changed in two
             different workspaces, it creates what the Oracle documentation calls a
             conflict. Such conflicts cannot be resolved automatically because there is no
             way for Oracle to determine which version of the row is the version to keep.
             Manual conflict resolving is required in such cases. In this article, I am
             going to demonstrate that.
        </p></description>
      <pubDate>Tue, 09 May 2006 23:15:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/05/09.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On creating workspaces and merging/refreshing data with Oracle's Workspace Manager</title>
      <description><p>
      With Oracle's Workspace Manager it's possible to have several <i>versions</i> of data. 
      That is, data can be changed, thus giving it a new version, without users looking at data of another version seeing the modified data. 
      In this article, I try to explain this feature.
        </p></description>
      <pubDate>Sun, 07 May 2006 23:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/05/07.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On emulating tables with PL/SQL (Part II)</title>
      <description><p>
          On <a href='http://www.adp-gmbh.ch/blog/2006/01/08.html'>January 8th</a>, I have demonstrated how to 
          <i>emulate tables with nested tables in PL/SQL</i>. Unfortunately, these emulated tables have a drawback: they can only store a number and
          a varchar2(15) per row. This article shows how to create <i>truly</i> dynamic tables, that is, the number of columns in the table can
          be dynamically controlled.
        </p></description>
      <pubDate>Fri, 24 Mar 2006 12:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/03/24.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On reading trace files with PL/SQL</title>
      <description><p>
         Reading a trace file is usually a three step process. First, the trace file is
         created with an SQL statement such as <code>alter session set sql_trace=true</code>. Then,
         the name of the trace file along with the directory that stores it, is
         located. Finally, the trace file is opened in an editor.<p>
         </p>
         I hate doing repetitive things and whenever possible, I let the computer do it. 
         That's why I created a PL/SQL package that is able to read the content of a trace file without the <i>hassle</i> of manually identifying it. 
        </p></description>
      <pubDate>Sun, 05 Feb 2006 00:00:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/02/05.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On a breakable Oracle</title>
      <description><p>
      I usually don't do this sort of things, but this time, it seems real serious and I <i>have to</i> urge every dba to
      install <a href='http://www.oracle.com/technology/deploy/security/alerts.htm'>the January 17th, 2006 critical patch update</a>. 
      The reason: Imperva has found a <a href='http://www.imperva.com/application_defense_center/papers/oracle-dbms-01172006.html'>security bug</a>

      that allows practically anyone to create a user with dba privileges (found via 
      <a href='http://www.petefinnigan.com/weblog/archives/00000699.htm'>Pete Finnigan's website</a>).
      </p><p>
      The bug boils down to the fact that SQL*Plus sends an <code>alter session set nls...</code> statement to Oracle when it initiates a connection.
      This statement is executed by Oracle with the rights of <a href='http://www.adp-gmbh.ch/ora/misc/sys_system_internal.html#sys'>sys</a>. Now, this statement
      can <i>easily</i> be replaced with another one. More details can be found at
      <a href='http://www.imperva.com/application_defense_center/papers/oracle-dbms-01172006.html'>impervas link</a>.
      </p><p>
       I verified the severity of this bug with two steps. In the first step, I intercepted the communication between SQL*Plus and the Oracle Server
      in order to find out how the <code>alter session</code> statement in question is transmitted. In the second step, I actually injected two
      SQL statements, the first of which creates a new user and the second of which grants dba to the newly created user.
      </p></description>
      <pubDate>Tue, 24 Jan 2006 21:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/01/24.php</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On emulating tables with nested tables</title>
      <description><p>
   In PL/SQL, tables can be emulated with nested tables. A nested table type is
   created with the create type type_name as table of dependand_type_name
   command. Basically, this command creates a type (here with the name
   type_name) that can store 0, 1 or more instances of dependand_type_name. To
   make theory a bit more clear, this is demonstrated in this article.
      </p></description>
      <pubDate>Sun, 8 Jan 2006 23:50:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2006/01/08.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On the lazy evaluation of decode and the eager evaluation of nvl</title>
      <description><p>
          Oracle employs lazy evaluation for decode, but eager evaluation for nvl and nvl2. This article tries to prove this fact.
      </p></description>
      <pubDate>Wed, 28 Dec 2005 23:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/december/28.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On comparing mulitple SQL statements' statistics</title>
      <description><p>
      When <a href='http://www.adp-gmbh.ch/ora/sqlplus/autotrace.html'>autotrace</a> is set within SQL*Plus, statistics about a DML statement will
      be shown when the statement has finished. This is quite a usable feature to compare different SQL statements regarding their
      performance.
         </p>
         <p>
      However, I miss the ability to compare multiple SQL statements. <a href='http://www.adp-gmbh.ch/ora/tuning/statspack.html'>statspack</a> comes
      closer, but still is not what I want. Therefore, I have written a package to do what I need.
      </p></description>
      <pubDate>Mon, 26 Dec 2005 23:45:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/december/26.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On making Oracle's regular expressions a bit easier to use</title>
      <description><p>I like programming Perl a lot. When I first used Perl some ten years ago, I immediatly fell in love with this language because it was
      so easy to use regular expressions (I don't know much about today's <i>trendy</i> languages like Ruby or Python, but I guess, these
      languages make it equally simple to use regular expressions). 
        </p> 
        <p>
      Now, Oracle 10g comes with four 
      <a href='http://www.adp-gmbh.ch/ora/sql/re/index.html'>regular expressions</a> supporting sql functions: 
      <a href='http://www.adp-gmbh.ch/ora/sql/re/regexp_instr.html'>regexp_instr</a>,
      <a href='http://www.adp-gmbh.ch/ora/sql/re/regexp_substr.html'>regexp_substr</a>, 
      <a href='http://www.adp-gmbh.ch/ora/sql/re/regexp_replace.html'>regexp_replace</a> and
      <a href='http://www.adp-gmbh.ch/ora/sql/re/regexp_like.html")'>regexp_like</a>. Yet, using them is not nearly as simple as using Perl's regular expressions.
      Specifically, I am missing an easy way to get the values matched by paranthesis. So, I <i>had</i> to write a package to do that for me.
      </p></description>
      <pubDate>Thu, 22 Dec 2005 23:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/december/22.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On triggers, sequences, autonumbers and failing inserts</title>
      <description>Is a sequence increased when I use a trigger and a sequence to generate autonumbers and an insert fails?</description>
      <pubDate>Mon, 19 Dec 2005 23:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/december/19.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On a table's first five rows</title>
      <description>Using rownum to select the first n rows does not always return the same records</description>
      <pubDate>Sun, 11 Dec 2005 23:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/december/11.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On identifiying "periods of activity"</title>
      <description>I have a table that logs what items were bought at what time from a vending machine. Now, I want to find periods of activity on this machine.</description>
      <pubDate>Mon, 28 Nov 2005 22:50:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/november/28.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On creating bitmaps with pure PL/SQL</title>
      <description>Out of idle curiosity, I wanted to know if it is possible to create bitmaps (BMPs) with pure PL/SQL alone. And it is!</description>
      <pubDate>Tue, 22 Nov 2005 23:40:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/november/22.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On reading blobs from and writing blobs to a file</title>
      <description>Writing blobs to a file and reading them from a file is too tedious for my liking. Therefore, I have written a package to faciliate these tasks.
        It comes with a procedure (to_file) which writes a blob to a file, a function (from_file) which reads a file into a blob and returns it
        and a procedure(from_file) that copies a file into the blob passed as parameter.</description>
      <pubDate>Sun, 20 Nov 2005 23:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/november/20.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On mixing outer joins with inner joins</title>
      <description>A few ways to combine an outer joins with an inner join in a select statement.</description>
      <pubDate>Wed, 16 Nov 2005 23:15:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/november/16.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On improving a better describe</title>
      <description>
            Recently, I presented <a href='http://www.adp-gmbh.ch/blog/2005/september/25.html'>a better describe</a>. 
            Now, <b>Janus Christensen</b> sent me an email with some improvements.</description>
      <pubDate>Sat, 12 Nov 2005 13:55:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/september/25.html#improved</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On eliminating outliers in avg() queries</title>
      <description>
        <p> Suppose, you have a table that stores some text along with a number: </p>
        <pre>create table elim_lowest_highest (
  txt varchar2(10),
  num number
);</pre>

    <p> Now, you want to select the average num grouped by txt from this table. However, you realize that the lowest and highest values per group (txt) are outliers and you want to eliminate those.</p>

    <p>The <a href='http://www.adp-gmbh.ch/ora/sql/analytical/row_number.html'>row_number()</a> <a href='http://www.adp-gmbh.ch/ora/sql/analytical/index'>analytic function</a> comes in handy for this task.</p></description>
      <pubDate>Fri, 4 Nov 2005 23:10:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/november/4.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On using triggers to keep summary data in the nodes of hierachical data in sync</title>
      <description>
        <p>

              In my <a href='http://www.adp-gmbh.ch/blog/2005/october/18.html'>last article</a>, I demonstrated how to store hierarchical data and how to 
              select from it. This article builds on that last article and shows how triggers can be used to keep summary data in the nodes of hierarchical 
              data in sync.
                        
      </p></description>
      <pubDate>Thu, 27 Oct 2005 21:15:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/october/27.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On storing hierachical data</title>
      <description>
        <p>
      The canonical approach to store <a href='http://www.adp-gmbh.ch/ora/data_samples/hierarchic_yahoo.html'>hierachical data</a> is to create a 
      <i>self referencing</i> table...</p>
<p><pre>
<a href='http://www.adp-gmbh.ch/ora/sql/create_table.html'>create table</a> hierarchy_tbl (
  id        number <a href='http://www.adp-gmbh.ch/ora/misc/integrity_constraints.html#pk'>primary key</a>,
  parent_id <a href='http://www.adp-gmbh.ch/ora/misc/integrity_constraints.html#fk'>references</a> hierarchy_tbl,
  data      varchar2(30)
);
</pre></p>
      <p>
      ...and then to use Oracle's <a href='http://www.adp-gmbh.ch/ora/sql/connect_by.html'>start with ... connnect by</a> idiom to select from it.  
      </p>
      <p>
      Unfortunatly, this approach causes a problem if a subtree can be assigned to more than one node. For example, let's assume you sell
      three products: prod_1, prod_2 and prod_3. In order to produce these products, you buy <i>things</i> (I'll call these <i>things</i> items) from
      other vendors. These items are then assembled into compositions. These compositions can then be assembled into further compositions. 
      Such a composition might not only consist of other compositions but also of other items. Finally, the compositions (possibly again along with items) 
      are then assembled into a product.
      </p></description>
      <pubDate>Mon, 17 Oct 2005 23:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/october/18.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On generating ERDs with desc_table and neato</title>
      <description><p>
          On <a href='http://www.adp-gmbh.ch/blog/2005/september/25.html'>September 25, 2005</a>, I presented 
      <a href='http://www.adp-gmbh.ch/blog/2005/september/25.html#specification'>desc_table</a> which is a package that can be used to extract various information about
      a table or view, such as column names, their types, <a href='http://www.adp-gmbh.ch/ora/misc/integrity_constraints.html#pk'>primary key</a> and
      <a href='http://www.adp-gmbh.ch/ora/misc/integrity_constraints.html#fk'>foreign key</a> constraints, as well as 
      <a href='http://www.adp-gmbh.ch/ora/sql/comment.html'>comments</a> made on the table and its columns. </p>

          <p>In this article, I try to show how this package can be used to create Entity Relationship Diagrams (ERD) along with
      <a href='http://home/Rene/www.adp-gmbh.ch/misc/tools/graphviz/index.html'>neato</a>. <b>neato</b> is a open source software that can be used to create graphs (directed
      or undirected).</p>
        </description>
      <pubDate>Mon, 3 Oct 2005 21:45:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/october/3.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On a better describe</title>
      <description><p>I am a bit disappointed with <a href='http://www.adp-gmbh.ch/ora/sqlplus/describe.html'>describe</a>. When I use it to describe a table 
        (or view), it only reports column names, their types and if they have 
        <a href='http://www.adp-gmbh.ch/ora/misc/integrity_constraints.html#not_null'>not null constraints</a>. 
      But I also want it to print the <a href='http://www.adp-gmbh.ch/ora/sql/comment.html'>comments</a> on a table and its columns. And, I'd appreciate 
      if it told me which columns make a <a href='http://www.adp-gmbh.ch/ora/misc/integrity_constraints.html#pk'>primary key</a> and which tables are 
      referenced by their <a href='http://www.adp-gmbh.ch/ora/misc/integrity_constraints.html#fk'>foreign keys</a>. It would be nice if describe told me, 
      if the described thing is a table or a view. Lastly, I want to know the owner of the table (or view).</p><p>
      Because <a href='http://www.adp-gmbh.ch/ora/sqlplus/describe.html'>describe</a> lacks all those little -but imho useful- features, I decided to write my own. 
      It consists of two parts: a package and an SQL script.  The script is basically a wrapper called from 
      <a href='http://www.adp-gmbh.ch/ora/sqlplus/index.html'>SQL*Plus</a> and wrapps the call of the procedure in the package.
      </p></description>
      <pubDate>Sun, 25 Sep 2005 21:15:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/september/25.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On the missing product() aggregate function</title>
      <description><p>Oracle doesn't have a built-in <a href='http://www.adp-gmbh.ch/ora/sql/agg/index.html'>aggregate function</a> 
        that multiplies its arguments (like <a href='http://www.adp-gmbh.ch/ora/sql/agg/sum.html'>sum</a> adds expressions).</p><p>
              However, using a well known mathematical property, it is possible to emulate such an aggregate function.</p></description>
      <pubDate>Mon, 22 Sep 2005 21:50:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/september/22.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On using dbms_utility.name_resolve</title>
      <description><p>
           Say, you encounter the following SQL statement:</p>
             <pre>
             select * from some_table;
             </pre>
            <p>Without knowing further details, you cannot be totally sure that there is actually a table named <i>some_table</i>. This is the case if there is
      a <a href='http://www.adp-gmbh.ch/ora/sql/synonyms.html'>synonym</a> named <i>some_table</i> that actually points to a 
      table with a different name.</p>

      <p>If you want to find out which table and schema <i>some_table</i> stands for, 
      <a href='http://www.adp-gmbh.ch/ora/plsql/dbms_utility.html#name_resolve'>dbms_utility.name_resolve</a> helps do that.</p> </description>
      <pubDate>Mon, 19 Sep 2005 20:10:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/september/19.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On solving a sudoku with Oracle</title>
      <description>A <a href='http://www.sudoku.com/'>sudoku</a> is a puzzle that consists of a 9x9 grid whose cells contain numbers between 1 and 9. At the beginning,
      only a few of these celles are filled in, and it's the solver's task to fill in every cell according to the following three rules: <ul>
        <li>Each row has no duplicate values in its cells</li>
        <li>Each column has no duplicate values in its cells</li>
        <li>The grid is split into 9 non-overlapping 3x3 blocks. These blocks also have no duplicate values.</li>
      </ul>
      <p></p> I have given myself the task to solve a sudoku with Oracle. Here's my solution.</description>
      <pubDate>Tue, 06 Sep 2005 22:00:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/september/6.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On a member function calling a member procedure</title>
      <description>I was very surprised when I tried to call a member procedure from a member function because I got a PLS-00363: expression 'SELF' cannot be used as an assignment. Why this is and how to avoid this.</description>
      <pubDate>Sat, 30 Aug 2005 21:30:00 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/august/30.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On an integer not always being an integer</title>
      <description>Until recently, I believed that an integer is a number that can only store whole numbers. Unfortunately, that is not always the case with Oracle.</description>
      <pubDate>Sat, 27 Aug 2005 10:19:10 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/august/27.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On max and group by</title>
      <description>This article presents three different ways to group a select's result set and find each group's record whose column is max().</description>
      <pubDate>Mon, 22 Aug 2005 16:22:48 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/august/22.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On emulating callback functions through deriving an object from another in PL/SQL</title>
      <description><P>PL/SQL does not have function pointers like for example C. In C, function pointers are used to (sort of) pass an arbitrary function to an algorithm of any kind. The algorithm can then call the passed function without knowing what this function does.</P><P>This article tries to show a way how to emulate such a behaviour</P></description>
      <pubDate>Fri, 19 Aug 2005 19:18:22 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/august/19.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On storing objects in tables</title>
      <description>In this article, I want to demonstrate how to achieve a parent-child relationship with PL/SQL objects stored in tables.</description>
      <pubDate>Tue, 16 Aug 2005 20:03:30 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/august/16.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>

    <item>
      <title>On tracking data changes in a table</title>
      <description><P>Oracle has a feature called Change Data Capture (CDC) which allows to track changes (coming from inserts, updates, deletes) in a table or in multiple tables.</P><P>This article demonstrates a tiny bit of CDC</P></description>
      <pubDate>Mon, 08 Aug 2005 23:52:14 GMT</pubDate>
      <link>http://www.adp-gmbh.ch/blog/2005/august/8.html</link>

      <author>Ren&#233; Nyffenegger</author>
    </item>


  </channel>
</rss>
