So I want to change one of the columns in my table from string to real. How am I supposed to do that?
Asked
Active
Viewed 3.6k times
14
-
2If the data is all real you do not need to change the field type, use to_real (field) – pigreco Jul 12 '17 at 16:43
1 Answers
32
Use Refactor Field in the Processing Toolbox.
Go to Processing > Toolbox > QGIS geoalgorithms > Vector table tools > Refactor fields
This will open the Refactor fields window where you can select the layer that you want to make changes to.
From the Type drop down choose Integer or Double depending if you want a whole number or a decimal number, respectively, and choose the length.
You can choose to save the new altered layer to a location or if you leave it as default 'Save to temporary file' then 'Save as' the new 'Refactored' layer that is loaded into your project.
Martin Hügi
- 3,612
- 2
- 22
- 51
-
Ok, so I have done everything that you have said, but there remains a problem, after I converted my table into a new refactored layer, I am unable to use one of the refactored columns as an interval for graduated styling, how can I fix this? – Shuryu Kisuke Jul 12 '17 at 18:56
-
This is a different question. Try searching for an answer on GIS Stack Exchange, or otherwise on the internet. If there is no answer you can find that helps then you can post a new question explaining what you are trying to do, and what you have tried. Does this help perhaps https://gis.stackexchange.com/questions/175633/manual-range-selection-for-graduated-style-vector-layer-in-qgis – Martin Hügi Jul 12 '17 at 19:18
-
I have fixed my problem now, there are two double options in my refactoring interface, its the top one that works. – Shuryu Kisuke Jul 12 '17 at 19:22


