[Qgis-user] Re : numbers to text in column

Junior delazj at gmail.com
Tue Jul 15 23:21:52 PDT 2014


Hi Simo,
at Carlos' Step 3, you can also try the "Case Else" function in the expression. Something like 
Case
when  "number" = 34522 Then '1-2 floors' 
When "number" = 34521 Then '3-n floors' End. (assuming number is the name of the numerical field).
Add enough "When... Then..." as needed in the expression if you have more than these two values to be changed. No need to select features before, just list all different combinations and all will be done at once.

----- Reply message -----
De : "Carlos Cerdán" <sig.upagu at gmail.com>
Pour : "qgis-user at lists.osgeo.org" <Qgis-user at lists.osgeo.org>
Objet : [Qgis-user] numbers to text in column
Date : mar., juil. 15, 2014 14:46

Hi Simo:

1. Open attribute table and create new text field (A number field doesn't can be changed directly into text).
2. Select by expression (number = 34522)
3 Open field calculator and select update field. Update the created field text. Expression for this field is new value that you want "1-2 floors".

4. Do same job for another value.

Good luck 

Carlos 




2014-07-15 6:06 GMT-05:00 Simo Turunen <simo.v.turunen at gmail.com>:

What are the steps, if you want to change numbers to text?
In atrribute table I have a column, which have numbers in it "34522" and "34521".

I want to change it that number "34522" is called for example "1-2 floors" or house and "34521" is called "3-n floors" or something else.


I could easily write that text in it, but when I have over 100 000 rows, it could take a little time :)


_______________________________________________

Qgis-user mailing list

Qgis-user at lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140716/322c4bae/attachment.html>


More information about the Qgis-user mailing list