Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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)

etc...

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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.