[Kexi] LIKE syntax

Jarosław Staniek js at iidea.pl
Mon Feb 25 09:47:30 CET 2008


John Jason Jordan said the following, On 2008-02-22 17:59:
> I have a field I use for selecting records in a database of test
> questions by placing unique strings in the field. For example, I might
> enter "FE1a-001" which means that it will be merged into Final Exam 1a
> and will be question #1. This works well, but sometimes I need to merge
> the same question into other documents. For example, if I want the same
> question to appear in Final Exam 3c as question #30 I need to enter
> "FE3c-030" in this field as well. 
> 
> I can add both values in the field, but then the select queries do not
> pick up the record at all. I need the LIKE operator to function as long
> as the string occurs *anywhere* in the field, not that the field be
> *the same as* the string. I can't find any documentation that addresses
> how to do this.

Pelase read Answer 1.9 at
http://kexi-project.org/wiki/wikiview/index.php?KexiFAQ#1._General_Features

A side note: perhaps you could split your composed field to two separate 
fields? Moreover, I can see here the many-to-many relationship:
Questions <-> Exams, so splitting the data to separate tables could help as 
well (that leads to using of drop-down lists in your table or form views).

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi)
  KDE Libraries for MS Windows (http://windows.kde.org)



More information about the Kexi mailing list