I am using ArcGIS 10.2 for Desktop, and I've been looking through this site, and can't seem to figure out my answer yet. Very new to VBA and Python, but lots of years with ArcGIS. I know I can do this the slow way with Select By Attributes, but It's time consuming.
I am attempting a spatial join between cases of a disease (points layer) and US Census Tracts (polygon layer). This requires count data. For each point/case, I have a field called YEAR with date ranges 2001 to 2012 depending on what year the case happened. I need a count column for each year. For example, the first one I'm calling COUNT01. If the case date in YEAR is 2001, then COUNT01 will have a 1 in it. If it is any other year (2002-2012), then there will need to be a 0. I will have COUNT02, COUNT03...COUNT12 columns. Can't have a "Null" value.
Here's what I've tried so far
And here is what the data looks like in Arc.
vba
andvbscript
tags with apython
tag. Although not gone yet VBScript is in the process of being deprecated. I expect it will easy to do with the Python parser once you provide a more detailed description which includes a picture/table of some sample rows showing actual input and expected output. Is YEAR a date field or an integer field containing values corresponding to years?