Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Pivots in Oracle 8i
In Oracle8i, look at the CUBE and ROLLUP SQL functions.
in article 39F3BE01.29260193_at_erols.com, Dave Godbey at luhbey_at_erols.com wrote on 10/22/00 9:26 PM:
> I'm looking for stategies for multi-joining a single table in Oracle. I
> imagine there must be some. Here is what I need to do:
>
> I have a table that holds financial records stored on a monthly basis.
> For a given set of criteria including year, I need to
> return a set of records that descrbe the financial activity over that
> year, eg
>
> Criteria... Jan Feb Mar April May etc.
>
> The approach I'm following runs rather sluggish, eg:
> With a SQL statement I instantiate 12 copies of the table with each copy
> bringing back the particular month of interest,
> stringing all 12 together for the complete yearly view of each
> record.horizontally.
>
> Are there better ways to do this, or should I sharpen up my performance
> tuning skills?
>
> I'm running Oracle 8i.
>
> Thanks,
> Dave Godbey
>
Received on Fri Oct 27 2000 - 02:08:24 CDT