Registered Member
|
I have version 2.8.5 installed and have gone through the documentation and forums but have not found information on how to create a calculated field in a query. Can this be done or is there some workaround for it (other than exporting the table to a spread sheet etc.)?
|
Moderator
|
Hi, do you mean aggregations of values from multiple records? -- https://en.wikipedia.org/wiki/Aggregate_function
Or a calculations on fields of same record? Eg. http://www.w3resource.com/sql/arithmeti ... rators.php The former isn't supported yet, the latter is (works best in SQL view though). |
Registered Member
|
Thanks for the quick reply, Jaroslaw. Yes this is for calculations on the same record, but involves trigonometric functions which I don't believe are supported in sqlite so I may need to just export the results to a spreadsheet after all. I had tried that with LibreOffice Calc but due to the size of the file there were memory problems when using standard filters in Calc. I may experiment with Calligra Sheets to see if I can overcome that problem.
|
Moderator
|
Very good.
Let's see what we have and plan: https://community.kde.org/Kexi/Plugins/ ... _Functions none of them just yet. We can always add any scalar function you want to SQLite via extensions. If it's a common function it would go to Kexi by default. Feel free to report: https://community.kde.org/Kexi/File_a_bug_or_wish For the record: There's even extension-functions.c at https://www.sqlite.org/contrib that we maybe can reuse. PostgreSQL has these enabled so all we will need is to allow their use: https://www.postgresql.org/docs/8.3/sta ... -math.html MySQL will be also fine with that https://dev.mysql.com/doc/refman/5.7/en ... tions.html |
Moderator
|
Registered users: Bing [Bot], gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]