名字或姓氏大小写更改查询不会产生意想不到的后果。
我正在 Sybase 应用程序中运行下面的查询,效果很好,但结果是当名字写成这样时,“ADNAN RAZA”就变成了“Adnan Raza”。我可以在这里使用的任何函数来检测空格或 - 后字母的位置并更新。无法手动完成,有超过 100k 条记录。
update master set firstname =
upper(left(firstname,1))+lower(substr(firstname,2));
I am running the query below in Sybase application which works great but the consequences are when the first name is written like this, "ADNAN RAZA" it makes it "Adnan raza". Any function which I can use here to detect the position of letter after space or - and update. Can't do it manually there are more than 100k records.
update master set firstname =
upper(left(firstname,1))+lower(substr(firstname,2));
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在Oracle SQL中有一个名为initcap(字符表达式)的函数。
Initcap 返回字符表达式,每个单词的第一个字符为大写,其余字符为小写。
我在 Sybase 的某个地方看到有 dbo.intcap(name) 用于此目的。
in Oracle SQL there is a function called initcap (character-expression).
Initcap returns character- expression with each word's first character in uppercase and the rest in lowercase.
i saw somewhere that in Sybase you have dbo.intcap(name) for this.
目前在数据库级别没有解决方案。
There is no solution for this at db level as it stands now.