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

From: okey <oldyork90_at_yahoo.com>
Date: Mon, 16 Aug 2010 12:38:28 -0700 (PDT)
Message-ID: <4b39e7a4-6164-4447-a879-7b07a581a643_at_y11g2000yqm.googlegroups.com>



On Aug 16, 1: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.

reference cursor? Just a quick answer to maybe help. Received on Mon Aug 16 2010 - 14:38:28 CDT

Original text of this message