Correct casing User last name retireved from database

G

Guest

Hi,

We are having this problem here on our project where we store all
firstnames, lastnames in the oracle database in uppercase, when we retrieve
the data to be used in web application and email letters, we do a propercase
on the names. But, for names like O'Rieley, McDonald, propercasing the name
returns Orieley, Mcdonald. Our client/customer requires us to display it as
ORieley, McDonald. Did anybody come across a similar situation or does
anyboday have suggestions as to how we could resolve this issue with the
minimum possible effort.

Any comments, suggestions will really be appreciated.

Thanks,
Shabana
 
N

Nicholas Paldino [.NET/C# MVP]

Shabs,

Personally, I would have stored the proper case in the database, and
then written the code to modify the values from the database. Now, you will
have to guess at what the proper casing should be (as there are not any
rules that can help you, which the McDonald case illustrates).

I think the best solution would be to store the names properly, and then
change the code that works with the values to expect that. I know it's more
work now, but in the long run, it will work out better for you.

Hope this helps.
 
W

Wayne

Not the best solution by any means, but I've seen this before. On your
database table store the names in their proper case and have another field
for the uppercase values, put a trigger on the table to update the other
field anytime the proper case field is set.

Company where a friend works does this, they do it as Searches in their
Oracle database is case sensitive, as I guess yours is hence the storing of
the uppercase. This gives them the display field to use on letters and web,
but also allows them to do the upper case searching without having to
convert the case every time they select from the table.

--
Thanks
Wayne Sepega
Jacksonville, Fl


"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein

Nicholas Paldino said:
Shabs,

Personally, I would have stored the proper case in the database, and
then written the code to modify the values from the database. Now, you will
have to guess at what the proper casing should be (as there are not any
rules that can help you, which the McDonald case illustrates).

I think the best solution would be to store the names properly, and then
change the code that works with the values to expect that. I know it's more
work now, but in the long run, it will work out better for you.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Shabs said:
Hi,

We are having this problem here on our project where we store all
firstnames, lastnames in the oracle database in uppercase, when we
retrieve
the data to be used in web application and email letters, we do a
propercase
on the names. But, for names like O'Rieley, McDonald, propercasing the
name
returns Orieley, Mcdonald. Our client/customer requires us to display it
as
ORieley, McDonald. Did anybody come across a similar situation or does
anyboday have suggestions as to how we could resolve this issue with the
minimum possible effort.

Any comments, suggestions will really be appreciated.

Thanks,
Shabana
 
N

Nicholas Paldino [.NET/C# MVP]

Wayne,

Instead of wasting the column space, why not just have an SP that will
apply the upper case to the value in the select and the parameter passed in?
It just seems like a waste of space.

In addition, the programmers against the database will have to remember
to always upper case, and then always compare against the new column. Not
the best thing, IMO.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Wayne said:
Not the best solution by any means, but I've seen this before. On your
database table store the names in their proper case and have another field
for the uppercase values, put a trigger on the table to update the other
field anytime the proper case field is set.

Company where a friend works does this, they do it as Searches in their
Oracle database is case sensitive, as I guess yours is hence the storing
of
the uppercase. This gives them the display field to use on letters and
web,
but also allows them to do the upper case searching without having to
convert the case every time they select from the table.

--
Thanks
Wayne Sepega
Jacksonville, Fl


"When a man sits with a pretty girl for an hour, it seems like a minute.
But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein

in
message news:#[email protected]...
Shabs,

Personally, I would have stored the proper case in the database, and
then written the code to modify the values from the database. Now, you will
have to guess at what the proper casing should be (as there are not any
rules that can help you, which the McDonald case illustrates).

I think the best solution would be to store the names properly, and then
change the code that works with the values to expect that. I know it's more
work now, but in the long run, it will work out better for you.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Shabs said:
Hi,

We are having this problem here on our project where we store all
firstnames, lastnames in the oracle database in uppercase, when we
retrieve
the data to be used in web application and email letters, we do a
propercase
on the names. But, for names like O'Rieley, McDonald, propercasing the
name
returns Orieley, Mcdonald. Our client/customer requires us to display
it
as
ORieley, McDonald. Did anybody come across a similar situation or does
anyboday have suggestions as to how we could resolve this issue with
the
minimum possible effort.

Any comments, suggestions will really be appreciated.

Thanks,
Shabana
 
W

Wayne

The Idea for them was they do so many queries on the data, more than any
writes, that it made sense to do the trigger as they took the hit to convert
the case up front instead of every time they wanted to read the data. I
agree it's not the best option, as I said in the first sentence of my
original post. This is just one way I've seen what he's doing accomplished
and thought I'd pass it on.

Wayne

Nicholas Paldino said:
Wayne,

Instead of wasting the column space, why not just have an SP that will
apply the upper case to the value in the select and the parameter passed in?
It just seems like a waste of space.

In addition, the programmers against the database will have to remember
to always upper case, and then always compare against the new column. Not
the best thing, IMO.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Wayne said:
Not the best solution by any means, but I've seen this before. On your
database table store the names in their proper case and have another field
for the uppercase values, put a trigger on the table to update the other
field anytime the proper case field is set.

Company where a friend works does this, they do it as Searches in their
Oracle database is case sensitive, as I guess yours is hence the storing
of
the uppercase. This gives them the display field to use on letters and
web,
but also allows them to do the upper case searching without having to
convert the case every time they select from the table.

--
Thanks
Wayne Sepega
Jacksonville, Fl


"When a man sits with a pretty girl for an hour, it seems like a minute.
But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein

in
message news:#[email protected]...
Shabs,

Personally, I would have stored the proper case in the database, and
then written the code to modify the values from the database. Now, you will
have to guess at what the proper casing should be (as there are not any
rules that can help you, which the McDonald case illustrates).

I think the best solution would be to store the names properly, and then
change the code that works with the values to expect that. I know it's more
work now, but in the long run, it will work out better for you.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi,

We are having this problem here on our project where we store all
firstnames, lastnames in the oracle database in uppercase, when we
retrieve
the data to be used in web application and email letters, we do a
propercase
on the names. But, for names like O'Rieley, McDonald, propercasing the
name
returns Orieley, Mcdonald. Our client/customer requires us to display
it
as
ORieley, McDonald. Did anybody come across a similar situation or does
anyboday have suggestions as to how we could resolve this issue with
the
minimum possible effort.

Any comments, suggestions will really be appreciated.

Thanks,
Shabana
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top