I have one filter devexpress filter control. I want to convert IN operator into Like condition.

Current Result -
Column_Name In ('10.00', '10.10') Or Column_Name In ('10.20', '10.15')

Expected Result
Column_Name like '%10.00%' Or
Column_Name like '%10.10%' Or
Column_Name like '%10.20%' Or
Column_Name like '%10.15%'

Can some one help on this how to do with easy logic in vb.net.?

Thanks.

It should be
Column_Name like '10%'

The LIKE predicate allows comparison of one string value with another string value, which is not identical. This is achieved by using wildcard characters.
Two wildcard characters are available here.
1) % - allows to match any string of any length(including zero length)
2) _ - allows to match on a single character.

The expression Column_Name like '10%' returns you 10.00, 10.10, 10.20, 10.15 and also all value which starts by '10'.
And the expression Column_Name like '10._0' returns only '10.00'.

Hope it can help you.

Thanks for posting the answer.

can you please help me out to how to do in code part in vb.net for replace In oprator in to Like '% %'.

Thanks.

Please post your codes and describe what do you want.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.