Home » Developer & Programmer » Reports & Discoverer » Can Formula Column used in Order By Clause
Can Formula Column used in Order By Clause [message #141410] Mon, 10 October 2005 02:01 Go to next message
cheesecake
Messages: 2
Registered: October 2005
Location: KL
Junior Member
I have a query that will return 5 columns.
And the 6th column are derived from formula column. The issue here, how do I use the formula column sort the records

Re: Can Formula Column used in Order By Clause [message #141419 is a reply to message #141410] Mon, 10 October 2005 03:05 Go to previous messageGo to next message
m_ashtiani
Messages: 27
Registered: August 2005
Location: Reno
Junior Member
one way to this is to wrap your select with another select

i.e.


select x.a, x.b, x.c, x.d, x.e
from (
select a, b, c, d, formula() as e
from ...
where ...

) x
order by x.e

another way is to create a "sever side" function or function inside a "server side" package, then you can use formula directly in your order by
Re: Can Formula Column used in Order By Clause [message #141435 is a reply to message #141419] Mon, 10 October 2005 05:02 Go to previous message
cheesecake
Messages: 2
Registered: October 2005
Location: KL
Junior Member
Initially, I did tried the function. But its pretty slow and afraid that it might contribute to the performance.

Again, since its Order By clause, it should have been lil bit slower.

I'll try with the first option. Nevertheless, I look for other option if available.

Thanks. It helps.
Previous Topic: Blank report
Next Topic: rep-1848 failed while trying to print.
Goto Forum:
  


Current Time: Sat Jun 29 06:59:34 CDT 2024