Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to return distinct records in case insensitive Oracle DB?

If I have 2 records with same information with difference in NAME of upper case and lower case and I want to show distinct record, how can I do it ? I tried to use distinct in query below but it showed both records :( Sorry but I am a green horn in SQL coding :(

SELECT distinct
R.NAME,
R.EXPIRY_DATE,
R.CATEGORY
FROM REALTIME_EXEMPT R
WHERE
R.SUBMITTED_BY='ADMIN'

Thanks in advance,

Reeya

like image 557
Reeya Oberoi Avatar asked Jan 16 '23 06:01

Reeya Oberoi


1 Answers

SELECT distinct(upper(R.NAME)),
R.EXPIRY_DATE,
R.CATEGORY
FROM REALTIME_EXEMPT R
WHERE
R.SUBMITTED_BY='ADMIN'
like image 183
manurajhada Avatar answered Jan 31 '23 01:01

manurajhada