[Kexi] Re: kexi queries

Jaroslaw Staniek staniek at kde.org
Sun Dec 12 15:16:40 CET 2010


On 11 December 2010 23:25, Tom Browder <tom.browder at gmail.com> wrote:
> I just started experimenting with kexi after several years.  I
> imported an Access db okay (data and structure fine, no queries were
> imported, too bad).
>
> I rebuilt a query for my one table but I can't get it to show data.
> I'm sure I've done something dumb but I can't see the error.
>
> My simplified buggy table looks something like this (the real db has
> more fields):
>
> fields:
>
> firstname (text)
> label (Yes/No)
> death (text)
>
> My query is:
>
> SELECT name FROM buggy WHERE buggy.label = 'Yes' AND (buggy.death =
> NULL OR buggy.death = '')

Hi Tom,
I am assuming you have entered this statement in the SQL view of the
query. If so, pressing the "Check Query" button can help to locate the
problem. A quick look tells me that you have label field of yes/no
type, so instead of comparing to string literal (buggy.label = 'Yes')
one should enter buggy.label = 1. (buggy.label = true should work in
the future too).
there's also no 'name' field but firstname. Third problem is
buggy.death = NULL. Checking for NULL in SQL should have form of:
buggy.label IS NULL. This is unsupported in kexi now though.
Summung up, my query that works is: SELECT firstname FROM buggy WHERE
buggy.label = 1 AND buggy.death = ''

PS: Because there are various reports from _many_ users, it would be
real timesaver next time if you create a test database with needed
tables and query if you want me to look at it quickly. Thanks.

>
> But I get no data results!  (I do on Access).
>
> I am using the latest trunk version source that I built today.
>
> I can send both database files (kexi and mdb) if anyone is interested.
>
> Two immediate enhancements I believe are needed (I haven't looked at bugs yet):
>
> 1.  Remember the last directory used to open a file.

Good idea! Added to near plans.

> 2.  Allow import from other file types than Access (I tried xslx and
> tab-separated, kexi complained about both).

XLSX is possible to implement and good idea (as an extension for
importing from ODS).
I propose to report this wish on bugs.kde.org if you have time.

Importing from CSV (including tab-separated) is possible. You just
have to create empty database and then import files (one-by-one) using
command "External Data -> Import Daat From File".

Thanks for the suggestions!

-- 
regards / pozdrawiam, Jaroslaw Staniek
 http://www.linkedin.com/in/jstaniek
 Kexi & Calligra (kexi-project.org, identi.ca/kexi, calligra-suite.org)
 KDE Software Development Platform on MS Windows (windows.kde.org)


More information about the Kexi mailing list