Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: plsql & decode
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