Re: Dynamic "Orde by" parameter in Oracle Stored procedure

From: ddf <oratune_at_msn.com>
Date: Mon, 16 Aug 2010 14:05:28 -0700 (PDT)
Message-ID: <e99269a7-02b2-454c-a403-30ae1af23104_at_f6g2000pro.googlegroups.com>



On Aug 16, 2:53 pm, Amritha <amritha.da..._at_gmail.com> wrote:
> Hi,
>
> I would like to execute a SELECT * from table1 order by <XYZ>
> and get the results into IN OUT cursor.
>
> I want to pass XYZ as input parameter to stored procedure.
> It is treating it as string.
>
> For example: if XYZ value is field1, it is executing the SQL statement
> as
> SELECT * from table1 order by 'field1'
> instead of
> SELECT * from table1 order by field1
>
> Please help.

Show us your procedure code. We can't help if we don't know what you've done.

David Fitzjarrell Received on Mon Aug 16 2010 - 16:05:28 CDT

Original text of this message