0

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?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Oct 13, 2015 at 10:49
1
  • 1
    Not 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. Commented Oct 13, 2015 at 10:55

1 Answer 1

4

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") + "}"
answered Oct 13, 2015 at 12:02
2
  • 1
    Good answer, although I have used find and replace in ArcMap attribute tables many times and it works just fine. Commented Oct 13, 2015 at 14:13
  • @cl3 I've removed the first line. Thank you for your comment. Commented Oct 13, 2015 at 14:59

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.