Group by Case sensitive?

Database
Enthusiast

Group by Case sensitive?

Hi Team,

Today i am surprised, one of my query is returning duplicate data. I tried to find it with the qroup by, but it didnt picked the duplicate. Excel helped me.

All values are same, except case difrrence in one field one has small 'r' and other has 'R'. Group by considered this as unique.

Is it correct?

thanks!

Rajesh Arra

Tags (1)
1 REPLY
Junior Contributor

Re: Group by Case sensitive?

Hi Rajesh,

GROUP BY is based on the [NOT] CASESPECIFIC column attribute.

Your column is defined as not being case sensitive, so both 'r' and 'R' are considered equal.

Change your query to SELECT col (CASESPECIFIC).