1

I know the synthax in order to fill one field with only one condition (field calculator):


case

When "attribut" = 'value' then value

End


But how to do populate automatically one field with two or three or more conditions?

I tried the following command but it does not work :


case

When "attribut" = 'value" and "attribut number2" = 'value' then value

End


Could you throw light for me?

1

Your values need to have single quotes around them, one has a double quote and one has no quotes (field names need double quotes and field values need single quotes):

This should work:

CASE

WHEN "attribut" = 'value' AND "attribut number2" = 'value' THEN 'value'

END

Your Answer

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

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