Pretty sure the jooq "contains" is really a substring search (it's java
after all), whereas MSSQL "contains" if a fulltext extention. Quite
likely not implemented in a generic tool such as jooq. Unless it's
hidden in the MSSQL dialect somewhere. If so you would need to cast you
DSL to that dialect explicitly. You may have to revert plain sql to get
that "contains(column, value)" function to work.
On 2/23/21 7:55 PM, Tuan Quoc wrote:
Hi robjs,
I am using SLQServer2012 dialect.
On Wednesday, February 24, 2021 at 9:36:36 AM UTC+7 [email protected]
wrote:
Which sql dialect has a “contains” function?
On Feb 23, 2021, at 7:02 PM, Tuan Quoc <[email protected]> wrote:
When I run this code:
DSLContext.selectFrom(tableName).where(DSL.field("fieldName").contains("value"))
-> the query is generated like this:
(1) Select * from tableName where fieldName like ('%' +
replace(replace('"value*"'), '!', '!!'), '%', '!%'), '_', '!_' +
'%') escape '!'
But the desired query is like this:
(2) Select * from tableName where Contains(fieldName, '"value*"')
--
You received this message because you are subscribed to the Google Groups "jOOQ User
Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jooq-user/fde252d4-42f4-f787-d147-03947b3bb47e%40gmail.com.