I am trying to import a CSV into a DBF using ArcCatalog (10.1).
In the field map, pictured below, I can only set an ID field to Long, Text, Double, etc. But there is no Numeric
type as in DBF and shapefile attributes.
If I import the ID field as a Long, values will be truncated. If I import it as Text, it will be different type than Numeric
. In either case, I won't be able to join the imported DBF to a shapefile with the ID.
How should I choose the type so that the ID in the imported DBF can be joined with a 'Numeric' ID in shapefiles?
enter image description here
1 Answer 1
I took a closer look and actually the data wasn't truncated. It's just that some values are bigger (1477701) and others are smaller (203071). I thought I had a truncation issue when I saw the smaller values in the first page of the DBF and the large values from a segment of the attribute table of the shapefile they are supposed to match.
On a different note regarding the "No numeric field" issue, I know that DBFs save numerical values in decimal text forms of the Numeric
type, and I got worried when I didn't see this option in ArcCatalog table-to-table importer's field types (i.e. when right click on CSV and export). What I did eventually is to import the CSV field as a Double
as in the OP picture, and the field ended up in DBF as a Numeric
field in ArcGIS. And this imported Numeric
field matches OK with the Numeric
field in the target shapefile it is supposed to match.
I suppose this is a good solution as importing integers as Double
didn't introduce any imprecision like 3.000000001 and the imported values in DBF compare well with the values in shapefiles.
Explore related questions
See similar questions with these tags.
Double
and it just showed in DBF asNumeric
. I will delete my question after you see this.