0

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.

Edited by Nirav Vasoya

2
Contributors
3
Replies
10
Views
2 Years
Discussion Span
Last Post by Shark_1
1

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.

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.