[Qgis-user] Working with field calculator on QGIS 1.8.0
lami at gis3w.it
lami at gis3w.it
Thu Jul 5 08:43:43 PDT 2012
Hi Manuel,
Try:
case when "COVER" = 'A' THEN "NEW_COVER" = 1 ELSE "NEW_COVER" = 2 END
Best,
Leonardo Lami
Gis3W
e-mail: lami at gis3w.it
Cell: 349 1310164
Web: www.gis3w.it
On Thu, 5 Jul 2012 09:26:41 -0600, Manuel SpĂnola <mspinola10 at gmail.com>
wrote:
> Dear list members,
>
> I am using the field calculator in 1.8.0 (Mac OS)
>
> I am creating a new field (column) called NEW_COVER and I want to assign
a
> value of 1 to the value A of the existing field (column) Cover and 0 to
the
> value B.
>
> Field: Cover
> Values: A, B
>
>
> In the Expression window I have:
>
> 'A' = 1
>
> But when I click OK, I don't get the result that I was expecting, to
have a
> value 1 on the new field NEW_COVER.
>
> What I am doing wrong?
>
> Best,
>
> Manuel
More information about the Qgis-user
mailing list