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: Beating the 255 variable DECODE fn - 8.1.6

Re: Beating the 255 variable DECODE fn - 8.1.6

From: <josn_at_my-deja.com>
Date: Mon, 15 Jan 2001 19:24:57 GMT
Message-ID: <93vipu$u9f$1@nnrp1.deja.com>

Ok let me restate the problem here:

I have data stored in a table in the format I have described below

Name Value


IssueID          1000
Assigned to      Fred
.....
IssueID          1001
Assigned to      Joe

.....

The Name/Value attibutes per IssueID are about 36 and what I want to achieve is a new dataset in a view that looks like:

IssueID          Assigned to
1000             Fred
1001             Joe

such that the view will have 36 columns. Now if I use the DECODE funtion, I end up with over 255 parameters all in all using the format: max(decode(expr,compare1',compare2,null))return_value. Any ideas?

=Jos

In article <93rfki$ppk$1_at_nnrp1.deja.com>,   Mike Krolewski <mkrolewski_at_rii.com> wrote:
> In article <93nfmb$nfo$1_at_nnrp1.deja.com>,
> josn_at_my-deja.com wrote:
> > Hello,
> > I am a newbie in PL/SQL and one task I am trying to accomplish
> > is "transpose" data in a table to a view for reporting purposes. The
> > data is stored in the format
> >
> > Name Value
> > -----------------------
> > IssueID 1000
> > Assigned to Fred
> > .....
> > IssueID 1001
> > .....
> >
> > I have successfully managed to use DECODE to transpose it but I am
> > running into the 255 variable limit. Does anyone have a possible
> > workaround to this apart from splitting the DECODE into 2 views then
> > creating a third view to join them?
> >
> > Thanks,
> > -Jos
> >
> > Sent via Deja.com
> > http://www.deja.com/
> >

>

> You might want to restate the original problem and what you mean by
> 'transpose data'. It sounds like a problem that could be solved by a
> different means. 255 decode statements is quite unusual.
>

> Again, state what the problem is, and your solution.
>

> --
> Michael Krolewski
> Rosetta Inpharmatics
> mkrolewski_at_rii.com
> Usual disclaimers
>

> Sent via Deja.com
> http://www.deja.com/

>

Sent via Deja.com
http://www.deja.com/ Received on Mon Jan 15 2001 - 13:24:57 CST

Original text of this message

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