Formula decimal bugfix
SQL fix