Wild Search keyword

Wild Search keyword

  

Hello,

I would like to ask how to search keyword case insensitive?

For example, my column value is 'Apple'.

and my filter condition is WHERE fruit like "%" + keyword + "%"

So when user enter apple, they cannot find the value as the value is 'Apple'.

How do i search the keyword without case sensitive?

Hello Jace,
You can use the ToLower()  function on an agregate, for example:

WHERE ToLower(fruit like "%" + ToLower(keyword + "%"


or in the case of SQL the LOWER ( character_expression ) function.

Best regards,
Francisco Freire.


Francisco Freire wrote:

Hello Jace,
You can use the ToLower()  function on an agregate, for example:

WHERE ToLower(fruit like "%" + ToLower(keyword + "%"


or in the case of SQL the LOWER ( character_expression ) function.

Best regards,
Francisco Freire.


Hello,

I tried putting this ToLower(fruit like "%" + ToLower(keyword + %) to aggregate

this one is returning text. I got an error say boolean data type required instead of text.


hi Jace,

could be:

ToLower(fruit) like "%" + ToLower(keyword) + "%"

regards,

Anonymous wrote:

hi Jace,

could be:

ToLower(fruit) like "%" + ToLower(keyword) + "%"

regards,

i just this before, doesn't work


Hi Jace jace,


please provide the aggregate, otherwise we just guess.


for that matter, afaik normally a sql-server already does a case-insenstive lookup, so not really needed to do a tolower.


Hello Jace,

The database is the platform database?

If so, by default, all text comparisons are case insensitive. I would say that if it is this, than the problem is elsewhere.

could you post the entire Sql?

Cheers,

Eduardo Jauch

Eduardo Jauch wrote:

Hello Jace,

The database is the platform database?

If so, by default, all text comparisons are case insensitive. I would say that if it is this, than the problem is elsewhere.

could you post the entire Sql?

Cheers,

Eduardo Jauch

oracle.

SyntaxEditor Code Snippet

Product.ProductCode like "%" + SearchKeyword + "%" or 
Product.ProductTitle like "%" + SearchKeyword + "%" or
Product.ProductDescription like "%" + SearchKeyword + "%" 


Solution

hi Jace,

try it..:


regards,

A

Solution