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: "ORDER BY" problem

Re: "ORDER BY" problem

From: Ahmad Mabsout <amabsout_at_sprint.ca>
Date: Wed, 4 Nov 1998 21:52:23 -0800
Message-ID: <U3b02.2310$gx1.1920594@HME2.newscontent-01.sprint.ca>

Zachary Agatstein wrote in message
<71qdav$t0m3_at_tmpsp002.tmpprv.allied.com>...
>In a query inside the Reports, I want to be able to do "ORDER BY" in
>accordance with input parameters. Say, I have a table A with columns named
>'columnA' and 'columnB'. I also have user parameters named 'param1' and
>'param2'. I would like to do the following:
>
>select columnA, columnB
>from A
>order by :param1, :param2;
>
>This presumes of course that the content of each user parameter would be
>'A.columnA' or 'A.columnB'.
>
>What is a correct way to do this?
>
>Thanks
>
>ZAch Agatstein
>
>

Hi ,

In your query you have to use lexical parameter

Example :

   select columnA, columnB
   from A
   &lex_order_by

Now when you run the report , you see in the input parameter lex_order_by ,
in this parameter your write for example : ORDER BY A.columnB .........

Ahmad Mabsout Received on Wed Nov 04 1998 - 23:52:23 CST

Original text of this message

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