Subject | Re: [firebird-support] cast 'nnn,nn' to float |
---|---|
Author | Milan Babuskov |
Post date | 2008-12-01T09:42:47Z |
danyschaer wrote:
from ttt
where cast(
SUBSTRING(fff from 1 for STRPOS(',', fff) - 1)||'.'||
SUBSTRING(fff from strpos(',', fff)+1 ) as float) > 100
--
Milan Babuskov
http://www.flamerobin.org
http://www.guacosoft.com
> I am working with a table that have into varchar fields some floatingselect fff
> values, but they use a comma as decimal separator (regarding regional
> settings).
>
> Is it possible to cast this values to floating point values?? ... so I
> can run filters like:
>
> select fff from ttt where cast(fff as float) > 100
from ttt
where cast(
SUBSTRING(fff from 1 for STRPOS(',', fff) - 1)||'.'||
SUBSTRING(fff from strpos(',', fff)+1 ) as float) > 100
--
Milan Babuskov
http://www.flamerobin.org
http://www.guacosoft.com