Ask Your Question

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

asked 2019-05-10 02:25:08 +0200

Kenneth_1949 gravatar image

updated 2019-05-10 02:40:52 +0200

Ratslinger gravatar image

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?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2019-05-11 03:50:34 +0200

Kenneth_1949 gravatar image

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

edit flag offensive delete link more



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.

Ratslinger gravatar imageRatslinger ( 2019-05-11 06:35:16 +0200 )edit

answered 2019-05-10 02:47:02 +0200

Ratslinger gravatar image


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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-05-10 02:25:08 +0200

Seen: 104 times

Last updated: May 11 '19