My Assistant
![]() ![]() |
|
|
Jul 6 2011, 09:31 AM
Post
#1
|
|
|
UtterAccess Guru Posts: 509 From: NE Wisconsin |
Hello,
I want to sort a text field as if it was formatted as number. Is it possible to set the Data Type of an expression in a query? What I mean here is I have a field (Notice_ID) formatted as text that I want to remove the first two characters leaving the remaining number values only. Then I could sort based on numbers. As an example, in my query I created an expression Notice_NO: mid([Notice_ID],3) Notice_ID Notice_NO R-1 1 R-22 22 R-117 117 R-244 224 Any suggestions would be appreciated. Thanks, SKK |
|
|
|
Jul 6 2011, 09:36 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 6,170 From: Bethesda, MD USA |
Try the following: Notice_NO: Cint(mid([Notice_ID],3))
This converts the text to an integer. |
|
|
|
Jul 6 2011, 09:42 AM
Post
#3
|
|
|
UtterAccess Guru Posts: 509 From: NE Wisconsin |
Excellent - that did it.
Thank you, Steve K. |
|
|
|
Jul 6 2011, 09:45 AM
Post
#4
|
|
|
UtterAccess VIP Posts: 6,170 From: Bethesda, MD USA |
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 20th May 2013 - 08:38 AM |