Re: Cross Table (Pivot Table) with Oracle Spread Table Control (MMTX32.OCX)

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 2000/06/07
Message-ID: <393e3d39.111364643_at_news.saix.net>#1/1


"Andreas Rothenwaender" <Andreas.Rothenwaender_at_safe.at> wrote:

>I'm looking for a nice and easy way to get a cross table result of Oracle.
>One way is to
>
> SELECT
> SUM(DECODE(col_key=key1, value, NULL)),
> SUM(DECODE(col_key=key2, value, NULL)),
> ...
> FROM
> mytable
> GROUP BY
> row_key;
>
>but this is neither nice nor easy, so I found the MMTX.TableType-property.
>This can be set to MMTX_PIVOT, but how can it be used in VC++ and VB?

Off topic in comp.databases.oracle.server

Besides, IMO it is utterly stupid to rely on on OCX's to create the "right SQL" for you. This only buys you grief and a lot of it. Especially when it comes to performance tuning and you discovered that by using silly things like OCX's got you to program yourself in a corner - and there is _nothing_ you can do about fixing the problems as the OCX can not perform.

SQL is easy. SQL is powerful. My suggestion is to USE IT! and not rely on abstraction layers like OCX's to do your job for you.

Billy Received on Wed Jun 07 2000 - 00:00:00 CEST

Original text of this message