Delete Attribute Field.

3286
9
09-04-2015 03:14 AM
RajP
by
New Contributor

I would like to create Python tool for deleting field using SQl Expression.

Can anyone suggest me.

0 Kudos
9 Replies
DanPatterson_Retired
MVP Emeritus

Did you look at the Delete Field code in the help?

0 Kudos
RajP
by
New Contributor

Yes, I had a look at the Delete Field code, Its is useful, Thanks.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

As Dan mentioned, there are code samples ​Delete Field—Help | ArcGIS for Desktop for deleting fields.

Are the Field names changing that require you to use a SQL statement for the field names? Or are you trying to query records and change the field value in the selected records?  That would be a different process and I think would make more sense for using a query.

0 Kudos
RajP
by
New Contributor

I would like to make query builder to select records and delete that selected recods.

0 Kudos
DanPatterson_Retired
MVP Emeritus

code samples for query and delete are in the online help, just emulate

http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/make-query-table.htm

RajP
by
New Contributor

DeleteTool.png

This is my tool. When I click ok then the selected fields should only deleted.

0 Kudos
RajP
by
New Contributor

Yes I am trying to delete the field values instead of field using SQl Statement.

DeleteTool.png

This is my tool.

0 Kudos
WesMiller
Regular Contributor III

If your trying to delete the values not the field then use a selection tool and then use field calculator to clear the fields.

0 Kudos
RajP
by
New Contributor

Ok, Thanks.

0 Kudos