Select to view content in your preferred language

Calculate fields

3532
15
03-29-2018 10:59 AM
jaykapalczynski
Honored Contributor

I am trying to concatenate a couple XY values

I have the X and Y fields (Double data type)

I created a Test field (string)

CONCAT(X, Y)

Then simply tried to calculate a simple test field

NAME  - this is a field name

I get this error:

ERROR002536 Table Jurisdictions does not support or is in a state to support SQL Expressions

Any thoughts?  Can do this in ArcMap in 2 seconds...ArcPro....ugggggg

0 Kudos
15 Replies
JoeBorgione
MVP Emeritus

Don't have an answer for you; how do you use CONCAT(X,Y) in ArcMap?  I get the same error as you  in ArcGIS Pro using the SQL parser choice, but if fails in ArcMap for me. I've never used CONCAT(X,Y) before and had to google it just to find out what it is.  

I got this simple Python def() to work in Pro:

That should just about do it....
DanPatterson_Retired
MVP Emeritus

python parser

X and Y , two fields

x = 10

y = 20

"{} {}".format(x, y)
'10 20'‍‍‍‍‍‍

you would therefore use !YourField! for each of the x and y values.

String concatenation in python, or check out arcade. but vb stuff is the new cobol

jaykapalczynski
Honored Contributor

That's guys....both do the trick....have to pick one for the answer....I like Dan's simpler approach but both answers are greatly appreciated....Still confused why simply SQL statements are not working in the SQL Expression Type

Somethin such as the below is failing

FieldName =

'TestingValue'

FieldName=

"TestingValue"

0 Kudos
KoryKramer
Esri Community Moderator

You said that you get 

ERROR002536 Table Jurisdictions does not support or is in a state to support SQL Expressions

That's the error in Pro?  Can you send a screenshot?  What database are you working with (file, Oracle, SQL server, etc.?) and version?

0 Kudos
jaykapalczynski
Honored Contributor

This is ArcGIS Pro 2.1.2

I am simply hitting a shapefile - I havent tried on a GDB or SDE FC

0 Kudos
DanPatterson_Retired
MVP Emeritus

python3

0 Kudos
jaykapalczynski
Honored Contributor

my example was the most simplistic I could think of...why does it fail with SQL Expression, which is the main question in this thread...

I was able to get it working in Python3

0 Kudos
DanPatterson_Retired
MVP Emeritus

shapefiles (yours) and geodatabase tables (mine) apparently don't support unless you 'do' something.

Maybe yours and mine is obviously not an sql thing.  I never use sql, I had erroneously assumed that yours was a valid sql thing.

Which... according to the help are

DanPatterson_Retired
MVP Emeritus

apparently....

0 Kudos