Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
Paulo Pinto
Greenhorn
+ Follow
news
1
Posts
0
Threads
since Oct 27, 2008
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads
Recent posts by Paulo Pinto
Alternative to LIKE Clause
I'm using now JBoss 4.2.3.GA and that SUBSTRING doesn't seem to work for this purpose anymore.
But I tried this and it worked for me:
SELECT OBJECT(o) FROM Person o WHERE o.name LIKE CONCAT('%', ?1)
This simulates the query:
SELECT OBJECT(o) FROM Person o WHERE o.name LIKE %?1
You can even do a CONCAT(CONCAT('%', ?1), '%') if you need something like '%?1%' instead.
show more
16 years ago
JBoss/WildFly