Global Mapper Pro Coming Soon

What operators do I use in a search string?

NEVNEV Global Mapper UserPosts: 59Trusted User
I am searching on a geological map for all areas that include the name hornfels in a series of TEXT_DESCR attributes. The data includes a number of values with this name prefixed by other names e.g. "Cordierite hornfels, biotite hornfels, calc-silicate hornfels" in the Text_Desc entry. I want the search to interrogate all Values that include hornfels in the TEXT_DESCR (there are at least 20 Value lines in the data set that include hornfels. Can I do this without having to do a separate search of each Text_Descr value line?
Thanks
Nev

Best Answer

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,328
    Answer ✓
    Hello,

    This will get any TEXT_DESCR field that contains hornfels, regardless of what is before or after it.
    %TEXT_DESCR% like '*hornfels*'
    For other minerals, replace 'hornfels' with the other mineral name.

    Cheers,
    Bob

Answers

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,328
    Hello,

    This should work:
    %TEXT_DESCR% like '* hornfels'
    Note that based on your examples, I am assuming that there is always a blank in front of 'hornfels'. If that is not the case, just remove it from the search string.

    Cheers,
    Bob
    JeffH@BMG
  • NEVNEV Global Mapper User Posts: 59Trusted User
    Thnaks Bob, I don't think that is the issue. As the attached screen shot shows, hornfels aooears in the Text_Descr in combination with other values. I want to search for every appearance of hornfels (or biotite or any other single mineral) in the Values list. I need advice on the syntaxt of the search string please?
    Cheers

    Neville

  • NEVNEV Global Mapper User Posts: 59Trusted User
    Yes, yes and yes, thanks Bob. Much appreciated.
    Cheers
    Neville
  • NEVNEV Global Mapper User Posts: 59Trusted User
    Hi Bob,
    Not quite there yet! When hornfels appears multiple times in the TEXT_DESCR (as in my previous screen shot 'Cordierite hornfels, biotote hornfels, calc-silicate hornfels') it is not picked up by the like *hornfels* search. Is there another type of search string to cover this?
    Cheers
    Neville
  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,328
    Hello Neville,

    The "like '*hornfels*'" search should work. I ran a similar test locally, and the features were selected regardless of how many times the search string appears. Please post a screen capture of your Search Vector Data dialog so I can see what other options are selected. Thanks.

    Cheers,
    Bob
  • NEVNEV Global Mapper User Posts: 59Trusted User
    Hi Bob,
    Thanks for your help and further offer. All OK now. Must have been an inadvertent keystroke I had somewhere in trhe string.
    Regards
    Neville
Sign In or Register to comment.