Board index » delphi » Sort on calculated fields ?

Sort on calculated fields ?

How can I sort on calculated field inTQuery ?
Can I use field of InternalCalc type in TQuery ?
 

Re:Sort on calculated fields ?


Quote
In article <6qg2ru$cm...@SOLAIR2.EUnet.yu>, "Nenad Maricic" (ne...@EUnet.yu) writes:
>How can I sort on calculated field inTQuery ?

Use SQL to calculate the field, give it a name and add 'Order by <name>' to
the end of the query.  Something like this:

        Select C.Company, C.LastName+", "+C.FirstName as Person
        from Clients C
        Order by Person

Quote
>Can I use field of InternalCalc type in TQuery ?

If you mean 'can I use OnCalcField in a query?' then the answer is yes, but
you can't sort on it.

Stephen Brown
sbr...@sprocket.win-uk.net
+44 (0)171 704 0702

Other Threads