I have a string field Bands in which i stored some fixed numeric values such as 41, 78, 800, 1800. These values are stored in the Bands field as comma separated. Now to get a single value from this field i used MySql query LIKE operator. Suppose if i want to take the valuee 800 then i am using the following query:
Select * from CapacityRequest where Bands LIKE ('%800%')
This query returns only 800 that is perfect but when i want to retrieve the value 1800 then it returns both 800 and 1800 for example:
Select * from CapacityRequest where Bands LIKE ('%1800%')
The above query returns both 800 and 1800 but i only want 1800 not 800. I also used the following query but it also not working:
Select * from CapacityRequest where Bands LIKE ('%18%')
The above query also returns both 800 and 1800. How to fix this issue?.
I am using this query in C#
Thanks in ADVANCE.

Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jun 13, 2020, 5:54 AM EDT
Adalat KhanRank #1,143 · 1.6K reputationPosted Jun 13, 2020, 6:24 AM EDT
Rajanikant Hawaldar
Amit GuptaRank #190 · 12.8K reputationPosted Jun 13, 2020, 6:32 AM EDT
Adalat KhanRank #1,143 · 1.6K reputationPosted Jun 13, 2020, 6:42 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts