【问题标题】:Custom/Built in Functions for Mixed Case/Camel Case in oracleoracle中混合大小写/驼峰大小写的自定义/内置函数
【发布时间】:2014-01-15 22:04:28
【问题描述】:

我需要根据数据以自定义方式处理名称列,如下所示。我需要为满足以下情况的字符加盖,我们在 oracle 中是否有针对这些情况的单独函数?

                   Check                                Example
1   First letter of each word is upper case (H & S in this example )        Hugo Smith
2   First letter following a space is upper case(B )    James A. Bond
3   First letter following a '/' is upper case(W, T)    Tonne/Wickey/Trisha
4   The 'II' and 'III' suffice are always all upper case    Larry III
5   First letter following an apostrophe is upper case(H)   Chris O'Harris
6   First letter following a dash is upper case(O)  Man-Oreoa
7   First letter following a '&' is upper case(T)   Hary,James&Tom
8   the acronym 'CFP' is always all upper case  Tanner, CFP
9   First letter following a period is upper case(P)    J.Paul

【问题讨论】:

  • 不,oracle 中没有内置的神奇功能可以评估这些验证要求。使用内置函数编写您自己的字符串操作。
  • 请不要将您的实际问题(或要求)发布为屏幕截图。我什至无法阅读缩放图像中的文字。
  • INITCAP 函数对除第 4 和 8 项之外的所有内容都运行良好

标签: oracle function built-in


【解决方案1】:

INITICAP 函数已被使用。 对于剩余的项目,我使用了 INITICAP + REPLACE 功能

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-07-29
    • 1970-01-01
    • 2018-12-18
    • 1970-01-01
    • 2012-03-17
    • 1970-01-01
    • 2016-08-07
    相关资源
    最近更新 更多