Select to view content in your preferred language

Joining a CSV to a Geodatabase

4298
11
12-05-2015 04:31 PM
ChaseBergklint1
Deactivated User

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
FreddieGibson
Honored Contributor

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).

DanPatterson_Retired
MVP Emeritus

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.

ParthaGhosh__GISP
Deactivated User

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

ChaseBergklint1
Deactivated User

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

0 Kudos
DanPatterson_Retired
MVP Emeritus

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

0 Kudos
FreddieGibson
Honored Contributor

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

0 Kudos
JoeBorgione
MVP Emeritus

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

That should just about do it....
ChaseBergklint1
Deactivated User

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

0 Kudos
FreddieGibson
Honored Contributor

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.

0 Kudos