QGIS field-calculator: set attributes to 1 if country name is in a list of values

المشرف العام

Administrator
طاقم الإدارة
In a country table, I create a region field, ECOWAS, with 1 if the country belongs to the regions 'ECOWAS', 0 else.Country names are in the field "sovereignt".How can I build a field-calculator expression, in which I would list countries belonging to this region?I tried:

"sovereignt" in ('Benin', *'Burkina Faso', 'Cape Verde', *'Gambia', *'Ghana')which returned the error:

syntax error, unexpected STRING, expecting COMMA or ')'What is a correct expression?



أكثر...
 
أعلى