Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
1.44/5 (3 votes)
See more:
I have a string of text that I need to convert.

Currently the text looks like:

code project is great platform to learn

I want to convert it to:

Code Project Is Great Platform To Learn

how can i perform this in a single query.
i'm using mysql version 5.5.28

thanks in advance.
Posted
Updated 13-May-15 2:11am
v3

Don't.
SQL is not good with string handling - this is a presentation function and is both better done in the presentation software, and a lot easier to do in the presentation language.
Do it in your C# or VB code!
 
Share this answer
 
Comments
rajiv padaki 13-May-15 8:31am    
i understand, but that is the task given to me. so i have to do it.
Maciej Los 14-May-15 4:15am    
Yes, it will be much, much easier!
Please, have a look here: MySQL - Capitalize first letter of each word, in existing table[^]. The author of an answer (Vinicius Pinto) suggests in His solution to write custom function.
Try!
 
Share this answer
 
Comments
rajiv padaki 19-May-15 0:55am    
hi , thank you . i do not have a table. i just have to perform it like that.

example select ('my name' and the remaining query )

output should be My Name.
could you please help me and thank you for the above response

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900