In a Base Query there is a calculated field - the result of the calculation is wrong.

Edited in from original main question ( @Ratslinger ):

I have set up a simple data base with one input Form, one main Table, and a Query. In the Query there is a calculated field. The problem is that the result of the calculation is wrong.

End edit.

The digits are correct but the decimal point is in the wrong place, so the result is 100 x greater than it ought to be.

The database is for a tree plantation where the trees are planted in blocks of known area (hectares). I use the word “block” and not “field”, to avoid confusion with “Field” as in a database. The three Fields are: Block Name, Block Area, and number of Trees in Block.

In the Query I want to divide the number of Trees by the Block Area to get the number of trees per hectare (Stand per Hectare, or SPH).

For example: Block Area 25.00, number of Trees 4,000, result should be 160, but it shows as 1,600.

What am I doing wrong?

Hello,

Please keep main questions short & to point. Also, when posting a question is it best to include minimal information - specific LO version, OS and with Base what database you are using.

OK, with that said, an educated guess here is that you are using a Firebird embedded database. This is a known problem. This can be fixed with a CAST. Please see my answer in this post → Computed field in query (on Firebird in Libreoffice).

If this guess is incorrect, please provide more information.

Thank you, I’ll give it a try. Yes, I my Base is using Firebird
Kenneth

@Kenneth_1949

Please do not post as an answer unless it actually answers the question asked. Use add a comment instead or to define further information for your question, edit it & note edited section.