What operators do I use in a search string?

NEV
Global Mapper UserTrusted User
in Vector Data
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
Thanks
Nev
Best 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
-
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 -
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.
-
Yes, yes and yes, thanks Bob. Much appreciated.
Cheers
Neville -
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 -
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 -
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
Howdy, Stranger!
Categories
- 12.3K All Categories
- 5.3K Features Discussion
- 312 Downloading Imagery
- 1.2K Elevation Data
- 374 Georeferencing Imagery Discussion
- 582 GM Script Language
- 42 User Scripts
- 112 GPS Features
- 388 Projection Questions
- 790 Raster Data
- 1.3K Vector Data
- 6.4K Support
- 160 Announcement and News
- 881 Bug Report
- 555 SDK
- 1.1K Suggestion Box
- 3.6K Technical Support
- 523 Other Discussion
- 126 GIS Data Sources
- 26 Global Mapper Showcase
- 217 How I use Global Mapper
- 101 Global Mapper Forum Website