Registered Member
|
I'm trying to use the following query
SELECT STRFTIME('%W', '2015-01-01') as weeknum FROM mytable; It works when I open the kexi project in sqlite3. When I try to enter it in the query editor I get the error "The query is incorrect". Error near "datatracker". I thought Kexi uses sqlite under the hood. What's the issue? Is there any way to get access to strftime and other sqlite3-specific functions in queries? |
Moderator
|
Hi flightsixteen,
Kexi parses query statements in order to be able to apply best solution available. Support status is collected for functions at: https://community.kde.org/Kexi/Plugins/ ... _Functions Unfortunately strftime() isn't supported. We recently addes substr() to 2.9.1. I see STRFTIME() is not that custom as we think, it's in PostgreSQL too. The idea of adding support for special 'native', not-portable SQL is a very good one, would solve the general issue quickly. A wish from 2012: https://bugs.kde.org/show_bug.cgi?id=298149 Just linked to bountysource: https://www.bountysource.com/issues/261 ... in-queries It's not a matter of a few lines of code though. Without parser we don't know what columns are there in the query, of what types and what constraints. Each database backend has own way to inform about this and SQLite lacked that completely when we started with it (it's one reason for having kexi__* metadata tables). |
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, sandyvee, Sogou [Bot]