Upper case formatting
I have group of words stored in a table single attribute
I want to make first letter of each word uppercase
Attribute => NAME
Value => mohan kumar
I want to format the value and fetch it as "Mohan Kumar"
Niote: value stored in single attribute
Any one can help me?
If by any chance this is part of a PHP script, you could do it very easily in the application code via the ucwords() function.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
NogDog, thanks for your reply.
Obviously it is easy by using PHP or any server side scripting language.
But i expect the functionality in MySQl
It's probably better to store the name as you want it in the database initially rather than performing an operation on it every time you retreive it.
This will do the first letter of a column value, but for you you'd need to store first name in one column and last name in the other.
SELECT CONCAT(UCASE(MID(name,1,1)),MID(name,2)) AS name FROM names;
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)