Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I have one table containing many columns. Using field calculator, I want to create a new column containing (for each line) the sum of all columns values. Pretty dumb, but just cannot find the correct expression to do this sum...
Using the field calculator:
"column1" + "column2" + "column3"
Make sure the columns are integer or float values and don't contain NULL values.
Sum up columns with NULL values:
"column1" + (CASE WHEN "column2" IS NOT NULL THEN "column2" ELSE 0 END) + "column3"
Required, but never shown