Re: "ORDER BY" problem

From: Richard Platt <rick.platt_at_btinternet.com>
Date: Wed, 4 Nov 1998 23:27:10 -0000
Message-ID: <71qnsa$qbc$1_at_mendelevium.btinternet.com>


Hi

I remember recently seeing some reports which used dynamic ordering from parameters, and all they had in the sql statement was

order by &parameter

Seemed to just substitute

Hope this is correct.

Richard Platt

Zachary Agatstein wrote in message
<71qd51$t0m2_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
>
>
>
Received on Thu Nov 05 1998 - 00:27:10 CET

Original text of this message