Home All Groups Group Topic Archive Search About
Author
17 Aug 2006 7:36 PM
Jim Abel
I am trying to control the format of the text values into a 2000 sql server
single column of a table.  The coloumn is a varcchar(50) and the incoming
values typically are as follows,
“New Server”
“new server”
“Standard”
“standart”
“STANDARD”

What I need is the first character of each word capililized and the remainer
in lower case

I am unable to get the formattomg set at the User Interface so is there a
way to dothis at the database?  Column properties such as the formila  ot a
trigger?  I don’t know what’s the best approach.

I appreciate the help, thanks

Author
17 Aug 2006 7:37 PM
Hari Prasad
Hi

Sql server do not have function to perform initcap. The only way to write
some code (Function or procedure).
Sample is available in Vyas site.

http://vyaskn.tripod.com/code.htm#propercase

Thanks
hari
SQL Server MVP

Show quote
"Jim Abel" wrote:

> I am trying to control the format of the text values into a 2000 sql server
> single column of a table.  The coloumn is a varcchar(50) and the incoming
> values typically are as follows,
> “New Server”
> “new server”
> “Standard”
> “standart”
> “STANDARD”
>
> What I need is the first character of each word capililized and the remainer
> in lower case
>
> I am unable to get the formattomg set at the User Interface so is there a
> way to dothis at the database?  Column properties such as the formila  ot a
> trigger?  I don’t know what’s the best approach.
>
> I appreciate the help, thanks
>

AddThis Social Bookmark Button