SQLite Forum

Division by decimals wrongly returning a rounded int result (works fine when casting to real)
Login
Hi, Thiago.

I think the idea behind that set of rules is to map the numerous typenames used in various SQL dialects to something reasonable. Of course, as your post shows, thinking on what that should mean varies.

Due to backward compatibility considerations, the present mapping is highly unlikely to change. So today's problem is how to adapt your generated SQL to SQLite's dynamic typing scheme.

While you do that, you will probably want to consider <u>[the decimal extension](https://sqlite.org/floatingpoint.html#decext)</u>. I expect you will need some SQL transformation specialized for SQLite, and that extension may provide a useful part of such a solution.

Good luck.