I have the following data in a Table
In SQL I need to write a query that searches for a string in a table. While searching for a string it should ignore case. For the below-mentioned SQL query
SELECT DISTINCT COL_NAME FROM myTable WHERE COL_NAME LIKE '%PriceOrder%'
gives all the above data, whereas
SELECT DISTINCT COL_NAME FROM myTable WHERE COL_NAME LIKE '%Priceorder%'
Eg. when I search for 'PriceOrder' or 'priceOrder' it works but 'priceorder' or 'Priceorder' doesn't work. I have tried with the below query using COLLATE, but its not working. Do let me know where I'm going wrong.
SELECT DISTINCT COL_NAME FROM myTable WHERE
COL_NAME COLLATE latin1_general_cs LIKE '%Priceorder%'