RATE THIS ANSWER
+1
Click to Vote:
1
0
You could use a combination of a few functions. Upper, Left, Substring, Len & Lower
select upper(left('QUESTION',1)) + substring(Lower('QUESTION'),2,len('QUESTION'))
select upper(left('question',1)) + substring(Lower('question'),2,len('question'))
So you could make a function that passes in a parameter and returns your value so you don't have to put all these functions in your insert and update statments.
create function InitCap (@InValue varchar(255))
returns varchar
begin
declare @returnval varchar(255)
begin
set @returnval = select upper(left(@InValue,1)) + substring(Lower(@Invalue),2,len(@Invalue))
return @returnval
end
end
Now your insert or update statement can reference the function
Insert into table (col1, col2) values (InitCap('question'), InitCap('ANSWER'))
Inserted values should be Question and Answer
Last Answered:
Jun 17 2009 2:17 PM GMT by Randym 
1410 pts.