Board index » delphi » Sort on calculated fields...

Sort on calculated fields...

Hi!

Using Delphi 5, Interbase 5 & bde 5.11

Is there an easy way to sort a calculated field in a dbgrid with sql?
Or do I have to make an index fot the computed table (if so how?)

Or maybe copy the calculated fields to another field ?

What is the easiest to use?

Carl Aarnes

 

Re:Sort on calculated fields...


The only way to sort on a calculated field is to use an internal calculated
field in a ClientDataSet. You cannot sort on any other calculated field
generated by an OnCalcFields event handler.

You cannot index a computed field in an InterBase table, however, you can
use it in the ORDER BY clause of a SQL SELECT.

--
Bill

Other Threads