I can't use SQL in my ArcGIS pro

3316
14
06-24-2019 02:43 AM
AliAzzouhri1
New Contributor III

Can anyone help me?  way I can't use SQL in my ArcGIS pro, they always show me this message

0 Kudos
14 Replies
DanPatterson_Retired
MVP Emeritus

To calculate strings to text or character fields, on the dialog box, the string must use double quotation marks ("string"), or in scripting, the string using double quotation marks must also be encapsulated in single quotation marks ('"string"').

https://pro.arcgis.com/en/pro-app/tool-reference/data-management/calculate-field.htm

AliAzzouhri1
New Contributor III

I tray with all types of data but still das not work...

0 Kudos
DanPatterson_Retired
MVP Emeritus

did you try Python 3, and check the expression with the check mark

DaveBarrett2
New Contributor II

It looks like  your features are in a shapefile?

SQL is not supported as an input method for Shapefiles, if you select the green tick a tthe bottom of your expression it should valiate it and warn that SQL is only supported for feature services.

Cheers

Dave

Asrujit_SenGupta
MVP Regular Contributor

Using a Shapefile, should throw an error as below:

DaveBarrett2
New Contributor II

Apologies, I was infering frm the FID field rathe tha OBJECTID, I an this alter on a Shapefile and go  error above. I also got an error stating it needed to be a feature service t use SQL.

Dave

KoryKramer
Esri Community Moderator

Why do we think this is a shapefile - did I miss something?  I would guess that the input is an Excel table (field is Field 1) - ArcGIS cannot directly edit (i.e. calculate a field) Excel tables.

See https://pro.arcgis.com/en/pro-app/help/data/excel/work-with-excel-in-arcgis-pro.htm#ESRI_SECTION1_CF...

You could copy the table to a feature class in a geodatabase and then do the calculations you need.

DanPatterson_Retired
MVP Emeritus

Try Python 3

AliAzzouhri1
New Contributor III

in ArcGIS pro, the SQL support just only enterprise GDB