As you can see, the items "chair" and "table" have duplicates with different casing. And what I need to do is to find a way to make the casing consistent and also add a number to the end of each duplicated item. The trick is that this needs to get done ONLY to the duplicates that differ in casing. So the entry Auto_Info should not be touched in any way. The result should look something like this:
What I have so far:
I've spent a lot of time trying to research the internet and merging what I find into a solution. So far I've only been able to find a way to extract the duplicates with different casing from the rest of the table in the following way:
alter session set NLS_COMP=ANSI;
alter session set NLS_SORT=BINARY_CI;
GROUP BY NAME
GROUP BY NAME
I'm very new to databases and any help with this problem would be very much appreciated.
In my opinion,
the one of remarkable functionality of DB2 related to this isuue might be the lack of support of Case Insensitive search.
(AFAIK, DB2 doesn't support Case Insensitive search directly.)
So, there might be another more elegant solution utilizing Case Insensitive search, on other DBMS.
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.