我有一串需要转换的文本。 [英] I have a string of text that I need to convert.

查看:62
本文介绍了我有一串需要转换的文本。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一串需要转换的文字。



目前文字如下:



代码项目是学习的好平台



我想将其转换为:



代码项目是学习的好平台



如何在单个查询中执行此操作。

我正在使用mysql版本5.5.28



提前感谢。

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.

推荐答案

不要。

SQL对字符串处理不好 - 这是一个演示功能,在演示软件中做得更好,在演示语言中更容易做。

用你的C#或VB代码做吧!
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!


请看这里: MySQL - 在现有表格中对每个单词的首字母大写 [ ^ ]。答案的作者(Vinicius Pinto)在他的解决方案中建议编写自定义函数。

试试!
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!


这篇关于我有一串需要转换的文本。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆