Hexagon Geospatial


Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
New Contributor
Posts: 4
Registered: ‎04-19-2017

Removing 'n' right characters from irregular length field

Hi all,


I've an access warehouse that has a text type column with attributes like:
1018,5 m^2
1098 m^2
19203,64 m^2
264,8 m2


and want only the numbers, removing the spaces and the m2 and m^2 characters


What expression(s) should I use?
I've been trying with LEFT and LEN without success.

Thank you in advance

Best regards.

Frequent Contributor
Posts: 111
Registered: ‎11-10-2015

Re: Removing 'n' right characters from irregular length field



You can use REPLACE to supress the m2 and m^2 and TRIM to supress the residual spaces


TRIM(REPLACE(REPLACE(Input.AttributeName, 'm2', ''), 'm^2', '')) must return you the correct string


You can use the VALUE function to get a numerical value



Posts: 43
Registered: ‎06-22-2016

Re: Removing 'n' right characters from irregular length field

If all registers have an empty space between the number and the m2/m^2, you can use the following functional attribute formula:


LEFT(Column, SEARCH(' ', Column) - 1)


It will extract all characters before the empty space




Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.