Sort on partial field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can a text field be sorted (using a query) on part of its contents
eg. field name is SubAcct, a text field of length 6; Subacct needs to be sorted on the last two characters, or SubAcct[5,6

ctda
 
create an expression in the query

srtfld:mid(SubAcct,5,2), and select ascending or
descending for sort.

-----Original Message-----
How can a text field be sorted (using a query) on part of its contents?
eg. field name is SubAcct, a text field of length 6;
Subacct needs to be sorted on the last two characters, or
SubAcct[5,6]
 
How can a text field be sorted (using a query) on part of its contents?
eg. field name is SubAcct, a text field of length 6; Subacct needs to be sorted on the last two characters, or SubAcct[5,6]

ctdak

Put in a calculated field by typing

Right([Subacct], 2)

in a vacant Field cell, and sort on this field.
 
John
Thanks. This is exactly what I ended up doing, after pondering for a bit the answer Les gave. It works great
ctda

----- John Vinson wrote: ----

On Fri, 5 Mar 2004 11:16:06 -0800, "ctdak
How can a text field be sorted (using a query) on part of its contents
eg. field name is SubAcct, a text field of length 6; Subacct needs to be sorted on the last two characters, or SubAcct[5,6

Put in a calculated field by typin

Right([Subacct], 2

in a vacant Field cell, and sort on this field

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=publi
 
Back
Top