Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Challenging Question

Re: Challenging Question

From: Raja Botham <raja_kommuri_at_yahoo.com>
Date: 18 Sep 2004 08:59:47 -0700
Message-ID: <ae473522.0409180759.771c3371@posting.google.com>


Thanks for the responses...

Yes,, the table is existing out there and it looks something like this,,,,

create table XX ( id number, total_amount, jan00 , feb00, ... ,sep04,oct04,...nov10,dec10);

I am forced to use this table as any changes to the table and ,therefore, a total change in the calling procedure would mean a lot of time for re-designing and testing.

The way I am looking at doing this is to dynamically get the value 'SEP04=30','OCT04=40' etc., and then insert this in the script.. But I am falling little too short of making it happen,,, I have the idea intact but all I request from you is a hint/suggestion to make it happen..

Once again, thanks for the responses.
--raja

Hans Forbrich <forbrich_at_yahoo.net> wrote in message news:<AWJ2d.67555$XP3.39900_at_edtnps84>...
> Raja Botham wrote:
>
> > I look forward to responses based on which I would start working on
> > it...
> >
>
> Are you looking at creating such a table or does it exist & you are forced
> to use it? The design pattern is that of a spread sheet and not a
> database.
>
> If yes, please consider that a database is not a replacement for a spread
> sheet. In database terms, you will get much better flexibility for future
> reports by going to a long but narrow table like
>
> Table XX
>
> Date Value
> ------- -----
> Jan 00 3
> Jan 01 6
> ...
>
> Then use a variety of techniques to pivot and cross-tab - saples at Morgan;s
> library on psoug's site (and iirc, at otn's sample code library).
>
> Other techiques, as well, are documented in O'Reilly's "Mastering Oracle
> SQL"
Received on Sat Sep 18 2004 - 10:59:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US