I am having an issue in qgis table joins. i have a joined a csv file to a sqlite database and common id is used for join. the join is displays correctly in attribute table.

the attributes in sqlite file is id and the csv file has id, building, surveyorid, surveydate. I want to add the surveydate information to the sqlite data permanently.

In the field calculator. i created a new field survey_date.

the expression field is "surveydate" (field from csv file), the output preview displays the result correctly.

The problem is on clicking ok, the new field(survey_date) gets populated with values of surveyorid. I tried other cases and each time, the new field gets populated with values from the field that is before the field in expression, i.e. if i try with surveyorid, i get the building values.

  • I've run into a bug where field calculations use the wrong field if some fields are turned off. Are all fields turned on in the joined layer?
    – nmpeterson
    Feb 18, 2014 at 14:13

1 Answer 1


This seems to be a bug (see http://hub.qgis.org/issues/9628 - apparently fixed in 2.2.)

Possible workaround:
I have experienced that when using fields from joined tables (I have tested dbf and csv), the field calculator messes things up when I choose "Create new field". If I change to "Update existing field", things seem to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.