0

I'm trying to perform a table join in QGIS (2.14.5-Essen) between a shapefile and a attribute table.
The join field and the target field is the ID of a spatial enumeration unit of 8 numerical characters length. (Examples: 04041133, 12214422, ...).
The join does only work successfully for IDs that do NOT start with '0' (zero). For the IDs starting with '0' (zero) the other attributes are set NULL.

I have found posts of people who seem to have the same problem, but just workarounds where offered as solution. I have read that the plugins "MMQGIS" and "ftools" offer table joins, too, but both are not working in my QGIS-installation.
As mentioned, the join works successfully for a part of the rows; so it is probably not an issue of data types.
The solution i see in the moment is, creating new ID fields without zero as starting character in both tables, but is there a simpler solution?

  • I think the problem is in the field type. The one which starts with 0 is a field of text type whereas the field which does not start with 0 is integer type or numerical type in general. The solution to your problem is to create new fields with types that matches each other and convert text to numeric or do the opposite depending which one is easier to achieve. – ahmadhanb Jul 20 '17 at 11:16
  • thanks, ahmadhandb, i unified the field type and it works now, at least for the majority of the fields. although i do not really understand why it - nevertheless - worked for a part of the rows before. – dijea Jul 20 '17 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.