fat controller
Slightly round the bend..
- Local time
- Today, 22:38
- Joined
- Apr 14, 2011
- Messages
- 758
I have a table which has a text field containing alpha-numeric information, simlilar to the below:
850.1
850.2
860.01
860.04
979 - A
979 - B
1001.2
1001.3
This data is historical, and cannot be changed as it is used outside the database as a reference number.
What I need to do is to have a small query that shows me the highest number from that field, ignoring anything after a decimal point or hyphen - so from the list above, 1001 would be the highest number. Is there a way to do this?
EDIT - I have a workaround that seems to work for the time being, which is to have a query which returns records where the ID (autonumber) is above a certain value - hence it returns only those where this alpha-numeric field is above 1000. This kinda gets me out of the hole, at least until it reaches 9999 - BUT it is less than elegant, so any suggestions gratefully recieved - - and no, the field cannot be changed from text to a number....
850.1
850.2
860.01
860.04
979 - A
979 - B
1001.2
1001.3
This data is historical, and cannot be changed as it is used outside the database as a reference number.
What I need to do is to have a small query that shows me the highest number from that field, ignoring anything after a decimal point or hyphen - so from the list above, 1001 would be the highest number. Is there a way to do this?
EDIT - I have a workaround that seems to work for the time being, which is to have a query which returns records where the ID (autonumber) is above a certain value - hence it returns only those where this alpha-numeric field is above 1000. This kinda gets me out of the hole, at least until it reaches 9999 - BUT it is less than elegant, so any suggestions gratefully recieved - - and no, the field cannot be changed from text to a number....
Last edited: