以大小写混合存储 [英] storing in mixed case

查看:86
本文介绍了以大小写混合存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格,数据存储在大写字母上。我想更改

它适当的混合情况。例如:更改数据,这是一个测试

到这是一个测试或

这是一个测试。

有没有简单的这样做的方法。


谢谢

I have a table with data stored on upper case. I would like to change
it proper mixed case. For example : change data from , THIS IS A TEST
to This is a test or
This Is A Test.
Is there any easy way to do this.

Thanks

推荐答案

create table testchar(col1 char(20));


插入testchar值(''这是测试'');


select substr(col1,1,1)concat lcase (substr(col1,2,19))

来自testchar的col1;


COL1

------ --------------

这是一个测试


1条记录已被选中。

Wonderinguy写道:
create table testchar (col1 char(20));

insert into testchar values (''THIS IS A TEST'');

select substr(col1,1,1) concat lcase(substr(col1,2,19))
as col1 from testchar;

COL1
--------------------
This is a test

1 record(s) selected.
Wonderinguy wrote:
我有一个表格,数据存储在大写字母上。我想改变它适当的混合情况。例如:更改数据,这是一个测试
这是一个测试或
这是一个测试。
有没有简单的方法来做到这一点。
谢谢
I have a table with data stored on upper case. I would like to change
it proper mixed case. For example : change data from , THIS IS A TEST
to This is a test or
This Is A Test.
Is there any easy way to do this.

Thanks






Blair Adamache< ba ******* @ 2muchspam.yahoo.com>写道:
Blair Adamache <ba*******@2muchspam.yahoo.com> wrote:
创建表testchar(col1 char(20));

插入testchar值(''这是测试'');

选择substr(col1,1,1)concat lcase(substr(col1,2,19))
作为来自testchar的col1;

COL1
- -------------------
这是一个测试
create table testchar (col1 char(20));

insert into testchar values (''THIS IS A TEST'');

select substr(col1,1,1) concat lcase(substr(col1,2,19))
as col1 from testchar;

COL1
--------------------
This is a test



如果你想做更多的花哨像这是一个测试之类的东西,那么你可能会更好地使用用户定义函数(UDF),可能在

Java中实现。


-

Knut Stolze

信息集成

IBM德国/耶拿大学



If you want to do more fancy things like "This is a Test", then you might be
better off with a user-definde function (UDF), possibly implemented in
Java.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena


有人能告诉我一个UDF,它做的是Knut所说的吗?任何输入都会很棒。


谢谢

Knut Stolze< st **** @ de.ibm.com>在消息新闻中写道:< bu ********** @ fsuj29.rz.uni-jena.de> ...
Can anybody show me a UDF that do what Knut is saying ? Any input will be great.

Thanks
Knut Stolze <st****@de.ibm.com> wrote in message news:<bu**********@fsuj29.rz.uni-jena.de>...
Blair Adamache< ba ***** **@2muchspam.yahoo.com>写道:
Blair Adamache <ba*******@2muchspam.yahoo.com> wrote:
创建表testchar(col1 char(20));

插入testchar值(''这是测试'');

选择substr(col1,1,1)concat lcase(substr(col1,2,19))
作为来自testchar的col1;

COL1
- -------------------
这是一个测试
create table testchar (col1 char(20));

insert into testchar values (''THIS IS A TEST'');

select substr(col1,1,1) concat lcase(substr(col1,2,19))
as col1 from testchar;

COL1
--------------------
This is a test



如果你想做更多花哨的事情,比如这是一个测试,然后你可能会更好地使用用户定义函数(UDF),可能用Java实现。



If you want to do more fancy things like "This is a Test", then you might be
better off with a user-definde function (UDF), possibly implemented in
Java.


这篇关于以大小写混合存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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