Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Run as a standalone python script for a shapefile in a toolbox on ArcMap.

For example:

psql_url_pop = '''SELECT shapefile.NAME_# + shapefile.WIKI_URL FROM public.shapefile'''

rows = arcpy.UpdateCursor("C:\shapefiles\shapefile.shp", psql_url_pop)


Essentially I am trying to concatenate the values of one field with those of another and decided to use '+' over CONCAT because I want all the values.

share|improve this question
What is your data source? PostGIS or a shapefile? Is your "public.shapefile" part of an ArcSDE database? More details about what you are trying to accomplish will help you get better answers. – RyanDalton Dec 3 '12 at 19:50
Sorry, its updated now. – Carl Carlson Dec 3 '12 at 19:58
Where is "public.shapefile" coming from? Are you trying to select data from a Postgresql database and then update all fields in a shapefile? Your where clause doesn't seem to make sense... – RyanDalton Dec 3 '12 at 20:06
I stated that it was a shapefile on ArcMap. As far as my WHERE clause I am concatenating two fields together and both are from public.shapefile. Just so you know there are two different syntax for this. You can do it this way or .getValue – Carl Carlson Dec 4 '12 at 14:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.