Timeline for AddFieldDelimiters not correctly adding field delimiters in arcpy
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 21 at 20:47 | vote | accept | Midavalo♦ | ||
Feb 21 at 20:40 | vote | accept | Midavalo♦ | ||
Feb 21 at 20:41 | |||||
Feb 20 at 21:02 | answer | added | PolyGeo♦ | timeline score: 1 | |
Feb 20 at 17:31 | comment | added | Midavalo♦ | @PolyGeo, MichaelStimson - I have updated my question with more info and additional code & error | |
Feb 20 at 17:27 | history | edited | Midavalo♦ | CC BY-SA 4.0 |
added info requested in comments
|
Feb 20 at 16:43 | comment | added | Midavalo♦ |
@MichaelStimson the query was simply "OBJECTID" <> 36 which failed in my search cursor, with an error I'll need to look up later. Having it changed to [OBJECTID] <> 36 worked as desired. I'll update my question when I'm able to re-test to get the error etc
|
|
Feb 20 at 3:13 | comment | added | Michael Stimson | I haven't experienced that, though to be fair I haven't worked with personal geodatabases for a while; ArcGIS Pro does not support personal geodatabases and the file size limit was restrictive. Can you edit your question to include a few lines up to the query being created and performed, a second (or more) set of eyes can't hurt as long as your code can be shared without causing you problems. | |
Feb 20 at 2:57 | comment | added | Midavalo♦ | @MichaelStimson I had a query keep failing in a search cursor. Once I changed from double quotes to square brackets (apparently needed by personal geodatabase) the query worked as desired. This caused me to try to use the Add delimiters tool to make it work no matter the database type. Perhaps there's another problem causing it all to not work | |
Feb 20 at 0:50 | comment | added | Michael Stimson | In ArcGIS for desktop you don't ned delimiters for a SQL expression in shapefiles (and dbIV tables), personal geodatabase and file geodatabase; I don't have enough experience with enterprise databases to say for sure one way or the other. In my experience (from ArcGIS 8.3 to the current version) the only time you need the delimeters is in the expression portion of Calculate Field. I can honestly say I've never used AddFieldDelimiters. | |
Feb 19 at 19:40 | history | edited | PolyGeo♦ |
edited tags
|
|
Feb 19 at 19:39 | comment | added | PolyGeo♦ | One thing is that I may not have used a Personal Geodatabase in Access for more than 10 years so perhaps that’s the one workspace type where they are still needed | |
Feb 19 at 19:36 | comment | added | PolyGeo♦ |
Personally, I never use AddFieldDelimiters() to construct queries. I think they were necessary for writing flexible data source type code until 5-10 years ago but then ArcMap started to support field names without delimiters in expressions and I think ArcGIS Pro has never required them.
|
|
Feb 19 at 18:14 | history | asked | Midavalo♦ | CC BY-SA 4.0 |