[Kexi] Query building query

Jaroslaw S kexipl at gmail.com
Wed Dec 23 23:12:08 CET 2009


2009/12/23 Bob Mesibov <mesibov at southcom.com.au>:
> I hope this isn't a dumb question - I'm new to Kexi!
>
> Suppose I have a table with a field containing the name 'Jekyll' as 'Jekyll and Hyde', 'Hyde and Jekyll' and 'Jekyll'. I want to query the table for all records with the name 'Jekyll' somewhere.
>
> If I set up a Kexi query using Text View, I can write a SELECT with the condition
>
> WHERE table.field LIKE '%Jekyll%'
>
> and get all the records.
>
> I have tried different ways to do this in Design View, but my entries in the Criteria field are always taken literally.
> How do I do wildcards in Criteria?

The query design view does not work well with the LIKE operator.
So for queries that contain it, please use the 3rd view (SQL view).
Writing something like this works:

SELECT * FROM table WHERE table.field LIKE '%Jekyll%'

Save the query design in SQL view, do not switch back to the design view.
You can switch directly to the data view.

In the project navigator, context menu item "Edit in Text View" brings
you to the sql view, which is preferred for this kind of query.

-- 
regards / pozdrawiam, Jaroslaw Staniek
 Kexi & KOffice (http://www.kexi-project.org, http://www.koffice.org)
 KDE Libraries for MS Windows (http://windows.kde.org)
 http://www.linkedin.com/in/jstaniek


More information about the Kexi mailing list