[Qgis-user] combine field calculator functions
Jürgen E. Fischer
jef at norbit.de
Wed Aug 7 00:36:44 PDT 2013
Hi Michael,
On Tue, 06. Aug 2013 at 13:38:35 +0200, Michael Giebels wrote:
> I am wondering how I could combine field calculator functions in order to
> convert information from an existing data column into a new one.
> What I can do with my mediocre knowledge is to query information from
> column 1 by setting
>
> "column1"='abc'
>
> which gives me a binary result (0,1) in my resulting column. Then I can
>
> replace ("newcolumn",'1','6')
>
> How could I combine these two into one working function (i.e. there MUST
> be a simple expression in the function list) and do not lose the new
> number when querying another information (e.g. 'cba') from column 1?
Um, are you looking for the following?
CASE WHEN "column1"='abc' THEN '6' ELSE '0' END
Jürgen
--
Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden http://www.norbit.de
committ(ed|ing) to QGIS IRC: jef on FreeNode
--
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502
More information about the Qgis-user
mailing list