I was replacing text in a field of attribute table, by using "Find and Replace". After saving and making new map by [Layer properties--Categories--Unique values--VAlue field--add all values--ok]
Now when i tried to replace some text values as before i am getting this msg
"An invalid SQL statement was used" {i am attaching screenshot}enter image description here
Please help, i want to replace some text like "Calcareous duricrust" with "{Calcareous Duricrust}"
What can i do?
-
1Not exactly sure what's going wrong for you, but a workaround seems to be to use Select by attributes --> Select all with the incorrect attribute --> Use Field Calculator to change it.Martin– Martin2015年10月13日 10:55:43 +00:00Commented Oct 13, 2015 at 10:55
1 Answer 1
In your case, I would use the field calculator (example with python syntax below)
"{" + !UNIT_NAME!.title() + "}"
.title() will capitalize the first letter of each word, and the + sign is used for concatenation. As mentioned by @Martin, you can use select by attribute first if you don't want to apply this rule to all your records.
Alternatively, you can use the .replace() function on a case by case basis (no need to select)
"{" + !UNIT_NAME!.replace("duricrust","Duricrust") + "}"
-
1Good answer, although I have used find and replace in ArcMap attribute tables many times and it works just fine.cl3– cl32015年10月13日 14:13:58 +00:00Commented Oct 13, 2015 at 14:13
-
@cl3 I've removed the first line. Thank you for your comment.radouxju– radouxju2015年10月13日 14:59:00 +00:00Commented Oct 13, 2015 at 14:59
Explore related questions
See similar questions with these tags.