So I have a property table that has addresses like below.
12 Andrews CL, Pxxx
1/12 Andrews CL, Pxxx
2/31 Macrossan ST, Pxxx
2/7-11 Barrier ST, Pxxx
I need to only show
12
1/12
2/31
2/7-11
Can this be done within the expression builder in Mapinfo 12?
In python it would be something like address[:address.find(' ')]
Answer
Yes, you can do this by using the Left$ and InStr functions as below. Check out the MapBasic Reference Guide (should be available in the Documentation folder of your MapInfo installation) for detailed information about those functions, along with a whole host of others.
Left$(address,InStr(1, address, " ") - 1)
No comments:
Post a Comment