Destination field matters. While the destination field has numeric type, and 
values can of course be converted to numbers then conversion will succeed and 
values will be numerically typed.

Envoyé depuis mon HTC

----- Reply message -----
De : "Matteo Ghetta" <[email protected]>
Pour : "Junior Delaz" <[email protected]>
Cc : "qgis-developer" <[email protected]>
Objet : [Qgis-developer] problem with 'toreal' in field calculator
Date : mar., mars 10, 2015 18:29

Hi Junior,
thanks, get it. So numeric conversion are sinful only between numeric fields 
right?

Cheers

Matteo

2015-03-10 18:25 GMT+01:00 Junior Delaz <[email protected]>:
hi,

If your field is recognized by QGIS as a string one, trying to overwrite its 
values type will fail as they are intended to be string in THIS field. This is 
why when you create a new numeric field and make conversion, it's ok (this new 
field expect numeric values, so it'll recognize your conversion).

2015-03-10 18:08 GMT+01:00 Matteo Ghetta <[email protected]>:

Hi all,
I have a filed made up by numeric values but recognized as text (should be a 
WFS issue and not a QGIS problem).
I've used the 'toreal' function of the field calculator in order to update the 
field but nothing changed (numbers are still read as text).
Strange is that if I create a new field using the 'toreal' function, values are 
correctly read as numbers and not as text.

Am I missing something or can be a bug?

BTW: debian testing and QGIS 2.8.1

Cheers


Matteo





_______________________________________________

Qgis-developer mailing list

[email protected]

http://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to