InvantiveのドキュメントInvantive Cloudの一部
Invantive サポートフォーラムログイン / 会員登録

INITCAP

構文

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> INITCAP[INITCAP]:::quoted
    INITCAP --> End((END))

目的

INITCAP SQL関数は、各単語の先頭文字を大文字に、それ以外の文字をすべて小文字に変更します。

パラメータ:

  • 入力 (varchar2): 処理するテキスト。

戻り値: 各単語の先頭文字を大文字にした入力値(varchar2)。

例

次の例は aap noot mies の大文字・小文字を変更します:

select initcap('aap noot mies')

----------------
Aap Noot Mies

次の例は JOHN DOE の大文字・小文字を変更します:

select initcap('JOHN DOE')

----------------
John Doe

次の例は 's-Hertogenbosch の大文字・小文字を変更します:

select initcap('''s-Hertogenbosch')

----------------
'S-Hertogenbosch