Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle INITCAP Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

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      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 111 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?