Board index » delphi » How to sort records based on calculated field?

How to sort records based on calculated field?

Any experts know how to sort records based on calculated field?
 

Re:How to sort records based on calculated field?


Quote
zh...@newton.tuns.ca wrote:

> Any experts know how to sort records based on calculated field?

Use a query, like:

select name, expences, income, (income-expences) as total from Table1
order by total

Johan
----

Re:How to sort records based on calculated field?


Quote
> Any experts know how to sort records based on calculated field?

  As mentioned in a previous message you can using a Query.  

  However, if you want to do it using the TTable, then you can't (at least not
that I am aware of).  Now, if you go with a third party DBGrid Component, I
believe you can.  You might want to grab the InfoPower Demo and see if that
will do what you want.  Hope this helps.
   --Cam--

Other Threads