On Feb 10, 2008, at 2:31 PM, Adrian Klaver wrote:
> Here is the sequence of events leading up to the error and the full
> error
> message.
>
> pl_biz=self.getBizobj()
> pl_ds=pl_biz.getDataSet()
> pl_rs=pl_ds.execute("select * from dataset where common ilike 'agast
> %'")
>
> Traceback (most recent call last):
> File "<input>", line 1, in <module>
> File "/home/aklaver/dabo_program/dabo/db/dDataSet.py", line 351, in
> execute
> self._cursor.execute(sqlExpr, params)
> OperationalError: near "ilike": syntax error
That's what I thought. DataSets are based on SQLite, no matter what
backend they originated from. So the only syntax that works is what
SQLite understands. According to the SQLite docs:
"The LIKE operator does a pattern matching comparison. The operand to
the right contains the pattern, the left hand operand contains the
string to match against the pattern. A percent symbol % in the pattern
matches any sequence of zero or more characters in the string. An
underscore _ in the pattern matches any single character in the
string. Any other character matches itself or it's lower/upper case
equivalent (i.e. case-insensitive matching). (A bug: SQLite only
understands upper/lower case for 7-bit Latin characters. Hence the
LIKE operator is case sensitive for 8-bit iso8859 characters or UTF-8
characters. For example, the expression 'a' LIKE 'A' is TRUE but 'æ'
LIKE 'Æ' is FALSE.)."
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]