Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Proper Case

Author  Topic 

vwilsonjr
Starting Member

45 Posts

Posted - 2003-05-28 : 13:45:14
I have a proper case function that will convert all caps to proper case. The problem I have is when I have a name like JOE SMITH III it converts it to Joe Smith Iii. How can I get around this. Is there a another propercase function out here.

Thank God for Forums.

Frederick Volking
Starting Member

9 Posts

Posted - 2003-05-28 : 14:33:54
I too have need of such a function (and others). But I've been unable to locate. Heck, I'm even willing to PAY for something.

I "imagine" a set of SQL function which handle things like proper capitalization of Names, parsing First+Middle+Last, and about a dozen mailing-address related clean-up routines.

I'm sure someone, somewhere, sometime, has written them. I just gotta find them.

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-05-28 : 16:19:54
Independent, but same thread:

http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=26584



Brett

8-)
Go to Top of Page

dsdeming

479 Posts

Posted - 2003-05-28 : 22:43:47
If all you're converting to proper case is names, you may be able to get by with some sort of NOT IN construct:

NOT IN( 'II', 'III', 'IV' )

That should suffice unless you've got Henry VIII or Pious XII in your database. I can't think of any other strings commonly found in names that you'd have to exclude.

Dennis
Go to Top of Page

Frederick Volking
Starting Member

9 Posts

Posted - 2003-05-29 : 07:40:28
There are also cases like: StFrancis, OToole, McDonald, MacKenzie

I don't think an elegant solution exists. I think a brute force method is the only solution. Someone needs to sit down, distill the possible problems and write a set of really big CASE statements!

Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2003-05-31 : 09:47:40
I stumbled on a site that claims to have proper case code. I haven't tried it though.. It's ASP based, so that won't help if you're dead set on doing it in SQL.

[url]http://www.simplelogic.com/Download/Download.asp?app=1&[/url]

Sam

Go to Top of Page
   

- Advertisement -