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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help Please . . .

Re: Help Please . . .

From: Mike Burden <michael.burden_at_capgemini.co.uk>
Date: Wed, 31 Mar 1999 09:29:03 +0000
Message-ID: <3701DCCF.44EBAE6@capgemini.co.uk>


You're so close. Try

Select col_1,col_2,col_3,decode(col_6,'DED',col_4,'COP',col_5,'uh! this value is ' || col_6)

JCEdleman wrote:

> Hi,
>
> This might be sort of a newbie question, but I have to ask it just the same . .
> .
>
> Here is an example of my data from a select . . .
>
> col_1 col_2 col_3 col_4 col_5 col_6
>
> X Y Z 20 NULL DED
> X Y Z NULL 30 COP
>
> I need to return 1 row with col_4 and col_5 on one line .Obviously, col_4 and
> col_5 are based on the value in col_6. I think I can use a "decode" some how,
> but I am not sure. Below is how I would Like it to look . . . .
>
> col_1 col_2 col_3 col_4 col_5 col_6
>
> X Y Z 20 30 (display not needed)
>
> Can anyone help me on this?
> Thank you.
Received on Wed Mar 31 1999 - 03:29:03 CST

Original text of this message

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