Quick Search:
 
 The Oracle INITCAP Function      [Return To Index] Jump to:  

Term: INITCAP

Definition:
The Oracle INITCAP function returns a character string with the first letter of each word converted to uppercase (also called "title case"). All other letters in the string will be converted to lowercase. Words are delimited by white space (spaces, tabs, carriage returns, formfeeds, vertical-tabs, and newlines) or characters that are not alphanumeric.

The input character string can be a CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype. The return value is the same datatype as the input character string. The database sets the case of the initial characters based on the binary mapping defined for the underlying character set. For linguistic-sensitive uppercase and lowercase, please refer to NLS_INITCAP.

The INITCAP function does not support CLOB data directly, but CLOBs can be passed in as arguments through implicit data conversion.

Example Syntax:

INITCAP(string)


Example Usage:

INSERT INTO test_table VALUES ('His dog is named Bill');
INSERT INTO test_table VALUES ('Lunch is at 1:00pm tomorrow');
INSERT INTO test_table VALUES ('John McGregor WILL arrive on wednesday');

SELECT INITCAP (str) FROM test_table;

------------------------------
His Dog Is Named Bill
Lunch Is At 1:00pm Tomorrow
John McGregor Will Arrive On Wednesday


Related Links:

Related Code Snippets:
  • InitCap - InitCap sets the first character in each word to uppercase and the rest to lowercase.
  • String Functions: INITCAP - Makes the first letter of each word upper case.
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org