https://bugs.documentfoundation.org/show_bug.cgi?id=126262

--- Comment #9 from Julien Nabet <serval2...@yahoo.fr> ---
(In reply to Lionel Elie Mamane from comment #8)
> (In reply to Julien Nabet from comment #7)
> > Again, it works with Forename and Surname, just fails with ID.
> > Perhaps converting UTF8 from ASCII part into INTEGER is ok but not UTF8 from
> > outside ASCII?
> 
> Ah, I had missed that the problem is with an INTEGER variable. Try something
> like
> 
>  CAST("ID" AS VARCHAR CHARACTER SET utf8) LIKE '%'

This:
SELECT "ID", "Forename", "Surname" FROM "Table1" WHERE CAST("ID" AS VARCHAR(10)
CHARACTER SET utf8) LIKE '%é%'
worked indeed in running direct SQL!
VARCHAR(10) or whatever not just "VARCHAR".

Putting it in the query adds quotes to UTF8
and so it becomes:
SELECT "ID", "Forename", "Surname" FROM "Table1" WHERE CAST( "ID" AS VARCHAR (
10 ) CHARACTER SET "UTF8" ) LIKE '%' || :search || '%' OR "Forename" LIKE '%'
|| :search || '%' OR "Surname" LIKE '%' || :search || '%'

but it worked too.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to