This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to Create a Calculated Field in a Query (trigonometric)?

Tags: None
(comma "," separated)
gbarker
Registered Member
Posts
2
Karma
0
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.)?
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS
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).


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
gbarker
Registered Member
Posts
2
Karma
0
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.
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS
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


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]