Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic Order By Clause

Re: Dynamic Order By Clause

From: Sybrand Bakker <oradba_at_sybrandb.demon.nl>
Date: Wed, 21 Nov 2001 19:39:04 +0100
Message-ID: <o2tnvtg0lbdtafhad96frgna5kkm7cqkdh@4ax.com>


On 21 Nov 2001 08:12:08 -0800, prakashcn_at_hotmail.com (Prakash C N) wrote:

>Hi,
>
> Can i have a dynamic order by clause, following is my example which
> is in a package
>
> select * from tab1
> order by columnname_in
>
> columnname_in will have the actual column name
> giving the flexibility of ordering by any column which is in tab1
> with out hardcoding the column name
>
> Thanks in advance
> -Regards
> Prakash C N

You'll need to study
dbms_sql (7.3 and 8.0)
Native Dynamic SQL (open <cursorvar> for :string) in 8i and beyond

Please always provide those 5 extra keystrokes, three digits and two dots, to make sure adequate answers are posted and it is not necessary to explain it for all different versions floating around.

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Wed Nov 21 2001 - 12:39:04 CST

Original text of this message

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