Joining a CSV to a Geodatabase

2732
11
12-05-2015 04:31 PM
Highlighted
New Contributor II

Hi, I have two files that I  need to join. I have a geodatabase file that has all the zip codes, Name of the state, the Object ID and other information.. I also have a CSV file that has the alumni for my school and their zip code. I am trying to join the two based on the Alumni Zip code. When I do that, not all the zip codes match.Can someone show me how to do that please? I have the documents posted here if you want to view them.

Thanks,
Chase

11 Replies
Highlighted
Regular Contributor II

You uploaded a layer (*.lyr) file and a csv file. The layer file is only a pointer to the data and does not contain your actual data. Could you upload your data as a layer package or could you give an example of a zip code that isn't matching? What are the types of the fields you're trying to match and are you sure that the values match exactly. For example, if the zip codes are being handles as strings "92373" is not equal to "92373 " (i.e. number with a space behind it).

Highlighted
MVP Esteemed Contributor

If the contents of a field are

  • left-justified, they are text ... regardless of what they look like
  • if they are right-justified they are numbers.

As Freddie points out, you have to consider leading and/or trailing spaces with text.

If one table's contents look the same as the others but the justification differs, then you have to convert to either a numeric or text standard

If just a few aren't matching, and the field is text, check for case as well as leading/trailing spaces.

I the above applies, but the values are numeric comparing floats is tricky ... but I doubt that this is your case.

Highlighted
New Contributor II

Please share the original geodatabase file. You have attached a .lyr file.

Highlighted
New Contributor II

For some unknown reason I can't upload the geodatabase here. Is it possible to do that?

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

zips should work...unless the files are large (I think they specify the max upload size when uploading)

Reply
0 Kudos
Highlighted
Regular Contributor II

If zip files don't work I'd suggest uploading a layer or map package.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Why not import the csv into you gdb as a table so you are working in the real world....

Highlighted
New Contributor II

I created a geodatabase inside the file. However, when I try to join them they don't all match.

Reply
0 Kudos
Highlighted
Regular Contributor II

Are you still unable to upload your data to geonet? If so, let me know and I can provide you with credentials to a secure ftp server where you can upload the data and I can take a quick look at it. Prior to uploading the data I'll need you to remove any confidential information.

Reply
0 Kudos