Below sql select query retrieves the data from table.
SELECT DISTINCT FRUIT_NAME,FRUIT_ID FROM Fruits ORDER BY FRUIT_NAME ASC
I have used "ORDER BY FRUIT_NAME ASC" which fetches the results based on Assending order as shown below.
Results :
Apple
Bannana
Mango
apricots
blueberries
I want a case insensitive search results like below.
Apple
apricots
Bannana
blueberries
Mango
I dont want to use upper() or lower() as it might affect performance for larger table data.
Also COLLATE NOCASE doesn't work with db2. Below is the error i got when i used COLLATE NOCASE in select sql query in db2.
1) [Code: -104, SQL State: 42601] ILLEGAL SYMBOL "COLLATE".
Is there any way to retrieve case insensitive data from sql select query using db2?