March 23, 2004 at 6:07 am
How to create function to Remove "CAPS" thet convet it to regular Text !!
and use it in table for select
thnks ilan
March 23, 2004 at 6:27 am
Try lower function
March 23, 2004 at 7:37 am
Unless you are trying to set all but the first character of the string to lower or each words first character remain upper then LOWER should handle all. If Want to keep first character uppper then do
UPPER(LEFT(col,1)) + LOWER(SUBSTRING(col,2,len(col)-1)
If the other I posted a script a long time back to parse the string and format with each word keeping the First character UPPER to this site. Sorry don't have the link right off but you should be able to go find it under me.
March 23, 2004 at 8:34 am
The same can also be accomplished by
select UPPER(LEFT(col,1)) + LOWER(RIGHT(col,len(col)-1))
from employee
Thanks
Prasad Bhogadi
www.inforaise.com
March 23, 2004 at 8:37 am
thnks
from msdn.microsoft.com
---------------------
LOWER
Returns a character expression after converting uppercase character data to lowercase.
Syntax
LOWER ( character_expression )
Arguments
character_expression
Is an expression of character or binary data. character_expression can be a constant, variable, or column. character_expression must be of a data type that is implicitly convertible to varchar. Otherwise, use CAST to explicitly convert character_expression.
Return Types
varchar
Examples
This example uses the LOWER function, the UPPER function, and nests the UPPER function inside the LOWER function in selecting book titles that have prices between $11 and $20.
USE pubsGOSELECT LOWER(SUBSTRING(title, 1, 20)) AS Lower, UPPER(SUBSTRING(title, 1, 20)) AS Upper, LOWER(UPPER(SUBSTRING(title, 1, 20))) As LowerUpperFROM titlesWHERE price between 11.00 and 20.00GO
------------------------------
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply