MapInfo Pro

Welcome to the MapInfo Pro community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Here are some useful links where you can find more information:

Product Announcements  Product Documentation  Ideas Portal

Discussions

Members

Resources

Events

 View Only
  • 1.  Using the "Update Column" function to delete the first ten characters from a text string?

    Posted 11-14-2017 04:42

    Hi all, i have had success in the past deleting all but the last ten characters in a text string using the "Update Column" function and the Value of:

    Right$(Field_Name, 10)

    However, I can't seem to work out how the "Update Column" function might be used to delete the first ten characters from a text string.

    Any suggestions would be greatly appreciated.



  • 2.  RE: Using the "Update Column" function to delete the first ten characters from a text string?

    Employee
    Posted 11-14-2017 02:00

    Mark,

    You need to calculate the number of characters to keep for each record and then extract these using the Right$() function:

    Right$(Field_Name, Len(Field_Name) - 10)

    Or you can use the Mid$() function to extract from character 11 to 254:

    Mid$(Field_Name, 11, 254)



  • 3.  RE: Using the "Update Column" function to delete the first ten characters from a text string?

    Posted 11-14-2017 15:25

    Thank you so much for your reply Peter?.

    I had too many records of varying lengths to use your first solution and so I used the second one (Mid$(Field_Name, 11, 254) and it worked perfectly !!!!

    Yours Sincerely.



  • 4.  RE: Using the "Update Column" function to delete the first ten characters from a text string?

    Employee
    Posted 11-15-2017 01:40

    Good to hear the solution worked for you.

    The first one would have worked too even with varying length strings. I can see that my explanation could make it look like you have to calculate the length manually but that is build into the expression: Len(Field_Name) will return the actual length of the individual text strings