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: PL/SQL with Decode problem

Re: PL/SQL with Decode problem

From: Guido Konsolke <Guido.Konsolke_at_triaton.com>
Date: Tue, 6 May 2003 14:58:05 +0200
Message-ID: <1052225474.822875@news.thyssen.com>


"GM" <george_91_at_yahoo.com> schrieb im Newsbeitrag news:7a9eb40b.0305060359.415d1aed_at_posting.google.com...
>
> ok I can get rid of the distincts...here is the simplified
> code...Would there be a solution with this version of the code?
>
> Thanks,
> GM
>
> DECLARE
>
> v_my_var varchar2(20);
>
> BEGIN
>
> select new_emp_code into v_my_var
> from( select decode((select emp_code from
> emp_table), 'A', 'B',
> 'C') new_emp_code
> from emp;
>
> END;
Not to the best of my knowledge. You *can't* use SELECT in DECODE. Maybe the group can be of help if you describe why you *need* the select in your decode. Oh, and by the way: there is a right paranthesis missing.

Give us some information about what you are trying to achieve and maybe some sample data to play around with.

Greetings,
Guido Received on Tue May 06 2003 - 07:58:05 CDT

Original text of this message

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