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: plsql & decode

Re: plsql & decode

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 04 Jun 2002 15:56:40 GMT
Message-ID: <3CFCE332.AFED1CB8@exesolutions.com>


tony wrote:

> Hi. I have declared the following cursor in a plsql procedure:
>
> Procedure tbl_list (pcode IN VARCHAR2) is
>
> CURSOR get_info_C is
> SELECT
> code, desc
> FROM codetable
> WHERE 0=0
> ORDER by DECODE (pcode, 'code', code, 'desc', desc, swvstyp_code);
>
> I would like to also pass either desc or asc from a href. Seems like
> I can't do another decode. Any idea how to get around this?
>
> many thanks
> cheers,
> tony
> 902.494.1021 w
> 902.461.4550 h

Rewrite this as native dynamic SQL. Pass in the pieces as parameters and stitch it all together.

Daniel Morgan Received on Tue Jun 04 2002 - 10:56:40 CDT

Original text of this message

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