[Kexi] Query criteria problem

Jarosław Staniek js at iidea.pl
Fri Feb 17 10:44:40 CET 2006


Neil R Koozer said the following, On 2006-02-17 01:31:

> The handbook doesn't include query information.

Neil,

Not translated to english. It's will be probably a part of the updated 
handbook in a few months.

> In the GUI query designer, I try to use      like 'abc%'
> as a criterion, but the query designer rejects this syntax.

The Visual Designer does not yet accept like 'abc%'  expressions. As a 
workaround I propose (just in this case) to use SQL View and enter SQL 
condition like:

"SELECT owner FROM cars WHERE cars.model LIKE 'Ford%'
                         ^^^^^^^^add this^^^^^^^^^^^^^^

Notes:
- "Check query" command will accept the condition
- being in the SQL View, save the query
- Do not switch back to the Visual Designer View, but switch _directly_ to 
data view - you will get your result; otherwise it will be screaming about 
'invalid expression' and you can lose the condition by saving the query in 
this mode
- LIKE operator in SQLite (file db) is case-sensitive unlike MS Access, the 
same for mysql (by default). We'll probably work to make that case-insensitive 
in for most db backends.

> As a side note, what is the meaning of the "totals" column just before the
> "criteria" column?

In 0.9 this didn't work and in 1.0 we decided to hide this. Will be 
implemented in 1.1. The plan is that you can e.g. select a numeric column, 
change 'totals' to SUM to see a groupped and summed query result. Read help 
for GROUP BY and SUM keywords, e.g. in any SQL handbook for more info.

-- 
regards / pozdrawiam,
  Jaroslaw Staniek / OpenOffice Polska

  Kexi Developer:      http://www.kexi-project.org | http://koffice.org/kexi
  Kexi Support:        http://www.kexi-project.org/support.html
  Kexi For MS Windows: http://kexi.pl/wiki/index.php/Kexi_for_MS_Windows
  KDE3, KDE4 Libraries For Developing MS Windows Applications:
                       http://www.kdelibs.com/wiki



More information about the Kexi mailing list