Title Case

Hello,
I have a table TRANS with a column called NAME (varchar2(40)). Most of the records are in title case already (St. John St) but there are a few in upper case (OLD HIGHWAY). I want to change the upper case records to title case. I've seen a few different ways on the internet to do this but I don't really understand them. I'm using SQLPLUS.
Any advice is appreciated! Thanks!

Be warned. INITCAP() is similar to, but not the same as TITLE(). INITCAP() makes the first letter or each word upper case. The function TITLE(), where I have seen it implemented, leaves minor words lower case - as in a book title.
INITCAP('not a deal') returns Not A Deal. TITLE('not a deal') would return Not a Deal.
Not necessarily a problem, just be aware of it.

Similar Messages

  • How can I use a script in a Livecycle Designer form, to force display of text in Title Case?

    Hello,
    I am a 'novice' who is DIY'ing the construction of a dynamic pdf form, using Adobe Livecycle Designer 7 (I know, it's a VERY old version!)
    [So, any help that comes along must be 'for Idiots'!]
    I need to construct a code (Java script?) so that a few of my text-fields DISPLAY data in Title Case - IRRESPECTIVE of how the user types in the data.
    So, for example, in a "Address" text-field...
    If someone types in ..
    "205 sherborne avenue"
    - OR -
    "205 Sherborne avenue"
    - OR -
    "205 SHERBORNE AVENUE"...
    I need the data to be DISPLAYED ESSENTIALLY as...
    "205 Sherborne Avenue".
    I found the following code online, and tried it in the 'exit' event of the field I need to modify (with 'language' selected as JavaScript)...
    <   this.rawValue = this.rawValue.replace(/\b([a-z])/g, function (_, initial) {return initial.toUpperCase();});   >
    ... This did convert all the 'initial' letters of the words to Upper Case - AS LONG AS they were not ALL typed in Upper Case!
    So, that code worked for the first two of my samples for Sherborne Avenue above - but it did NOT work for the last one...
    That is, "205 SHERBORNE AVENUE" did NOT get converted to Title Case - which is what I need help with.
    Thanks in advance...

    Hey TundraSteve,
    Thanks a tonne!
    Works perfectly!!!
    In fact, your solution is so elegant and direct, that even I am beginning to get a sense of how it works... I have looked at LOTS of similar codes in the past few days, but was not at all getting a sense of how they are working! But comparing your solution with the earlier one I mentioned, I am beginning to get a sense of things!
    Any suggestions for what I should read-up in order to understand this king of coding?
    I have basically been using the built-in 'Help' - and, trial-and-error - and I have designed my first form - a pretty elaborate one, actually!
    So, it would be great if you could guide me through the 'learning curve' a bit!
    [I have figured-out the 'basics' - that is, I can lay out the form, use 'if-expressions' (FormCalc), trigger events, even build Subforms that are hidden but 'appear' when triggered by other actions, and so on. What I can't figure out are the various 'code languages' (syntax?) that are being used - like " var sometext", for eg.!]
    Cheers, and thanks again!

  • Looking for a simple way to convert a string to title case

    New to LiveCycle and Javascript.  Looking for a simple way to convert a string to title case, except acronyms.  Currently using the the following, it converts acronyms to lower case:
    var str  =  this.rawValue;
    var upCase = str.split(" ");
    for(i=0; i < upCase.length; i++) {
    upCase[i] = upCase[i].substr(0,1).toUpperCase() + upCase[i].substr(1).toLowerCase();
    this.rawValue = upCase.join(' ');

    Thanks for the reply.
    Found the following script in a forum, which works fine as a "custom validation script" in the.pdf version of my form.  However, it will not work in LiveCycle?  The problem seems to be with
    "return str.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g"
    function toTitleCase(str) {
    var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;
        return str.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function(match, index, title){
    if (index > 0 && index + match.length !== title.length &&
      match.search(smallWords) > -1 && title.charAt(index - 2) !== ":" &&
    (title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') &&
    title.charAt(index - 1).search(/[^\s-]/) < 0) {
    return match.toLowerCase();
    if (match.substr(1).search(/[A-Z]|\../) > -1) {
      return match;
      return match.charAt(0).toUpperCase() + match.substr(1);
    event.value = toTitleCase(event.value);

  • How to convert a file name to title case

    hi,
      I have document library where name is displayed for the file that is uploaded. How do I convert the name to a calculated column =PROPER([name])? I've tried creating a new column, which is a calculated field =PROPER([name]) but it doesn't recognized
    the field. There is the title column which I can do a =PROPER([title]), but the title field isn't necessarily the same as the file name. Ideally, I want to convert to title case for any file uploaded. so the Name column is in the PROPER case. Thanks.

    "Title" is a field on the entity in the database. "Name" is what uniquely identifies the SPFile underlying the document.
    So you can think of Title as pretty arbitrary; you can change it just like you would change any other property (description, etc.) but if you change the Name, it is akin to moving the file. Names must be unique in folders/webs.

  • Logical Model Naming Standard (Title Case) and Foward ENGINEERING how to???

    Hi,
    I just installed the datamodeler v3.3.0.747.
    I want to use the Title Case style as separator style in my logic Model... To do this, i go to the Preferences Settings (Tools > Preferences > Naming Starndard > Logic Model) and set the Title Case as separator Style...
    However, when i do foward engineering of the logical model... The Style is omitted and everything is like the logical model... For example,
    If i create an entity called: ManagedAccount, i will expected that when i do fwd enginnering, the table associated to that entity will be call as Managed_Account; However, i still getting ManagedAccount...
    So, What am i doing wrong??? or this is a bug???
    Thanks!

    Hi,
    in order to get it working in current release you need to create glossary even empty one and set its property "Incomplete Modifiers" to true (check the check box with that name), and to to add that glossary in "Tools>Preferences>Data Modeler>Naming Standard".
    We'll change it in next release to work without glossary for this particular case.
    Philip

  • Title Case Indesign Script?

    I have paragraph/character styles set. But I need a script to change these to title case (currently all lower case). I know there is a script, but the only ones I have come across seem to be for CS5 or below. I'm currently on CC 2014. Any sources for this script?

    A lot of scripts do not depend on actual InDesign versions (if they do, it's usually only a limit for lower versions, not higher). Just try the one you got. If you get an error, you can use the Script Version Folder workaround:
    http://indesignsecrets.com/using-old-scripts-in-cs3.php
    That recently worked for me to run a troublesome CS5 script in the very latest version -- I did not have to find out the cause of error and somehow fix it!

  • Title case in Pages for mac?

    How do I use Title Case in Pages 5?

    Hi sore loser,
    That makes you a winner! Thanks for posting.
    Regards,
    Ian.

  • Make the Names to appear in title case

    Hi Friends,
    SAP master data maintained with all caps letters in standard & additional fields, but users are asking to make the Names to appear in title case in Ad hoc reports.
    Pls let me know the procedure.
    $ KL Sha

    Hi Manu And Pavani,
    Here i created a new thread SDN memories.
    please discuss in that.
    Ya, i know pavani waste creating new thread but this thread is meant for some other topic so better not to discuss in this.
    Manoj Shakya

  • Title Case - is it possible?

    I have a client who wants a lot of content on his web site put into title case (i.e. all caps but with first letter of each word larger). The only way I can think of is to set a larger font size span for the first letter ... I am dreading doing this, it would be soooo fiddly and clunky. There must be way I can define a style, but I haven't been able to find one ... Anybody have an idea of how to do this?
    thanks!

    You can try using a small-caps style along with text-transform:capitalize, e.g.,
    .caps {
         font-variant:small-caps;
         text-transform:capitalize;
    <p>this is a test <span class="caps">of the small caps when used with a capitalize transform</span>. Is it working?</p>

  • Title Case with Articles in Lowercase

    Is there a script or a way to get true Title Case? Illustrator caps every first letter. Seems word does the same, can't believe that there still is not an option for this.

    Mike, now it works with
    textFrame selection(s)
    and textRange selection
    what is it what you're having problems with? what other scenarios do you have to work with?

  • Smart Title Case - problem with script

    Having a problem here.
    When multiple paragraphs are selected the start of a paragraph is set to a lowercase
    how can I fix this?
    //DESCRIPTION: Converts selected text to title case smartly
    var ignoreWords = ["a", "an", "and", "the", "to", "with", "in", "on", "as", "of", "or", "at", "into", "that",
             "by", "from", "their", "then", "for", "are", "not","cannot", "be", "is", "which", "can"];
    var intCaps = ["PineRidge","InDesign","NJ","UMC", "FCCLA", "SkillsUSA", "d’Oeuvres", "VAT", "VIES",];
    // or by creating text files named ignoreWords.txt and intCaps.txt in the same folder as the script
    ignoreWords = getIgnoreFile(ignoreWords);
    intCaps = getIntCaps(intCaps);
    try {
        myText = app.selection[0].texts[0].contents;
    } catch(e) {
        exit();
    theWordRanges = myText.split("/");
    for (var i = theWordRanges.length - 1; i >= 0; i--) {
        theWords = theWordRanges[i].toLowerCase().split(" ");
        //First word must have a cap, but might have an internal cap
        myNewText = "";
        for (var j = 0; theWords.length > j; j++) {
            k = isIn(intCaps,theWords[j])
            if (k > -1) {
                myNewText = myNewText + intCaps[k] + " ";
                continue;
            } else {
                if ((isIn(ignoreWords,theWords[j]) > -1) && (j != 0)) {
                    myNewText = myNewText + theWords[j] + " ";
                } else {
                    myNewText = myNewText + InitCap(theWords[j]) + " ";
        theWordRanges[i] = myNewText.substring(0,myNewText.length - 1)
    app.selection[0].texts[0].contents = theWordRanges.join("/");
    // +++++++ Functions Start Here +++++++++++++++++++++++
    function getIgnoreFile(theWords) {
        var myFile = File(File(getScriptPath()).parent.fsName + "/ignoreWords.txt");
        if (!myFile.exists) { return theWords }
        // File exists, so use it instead
        myFile.open("r");
        var importedWords = myFile.read();
        myFile.close();
        return importedWords.split("\n"); // Could filter these, but what's the point?
    function getIntCaps(theWords) {
        var myFile = File(File(getScriptPath()).parent.fsName + "/intCaps.txt");
        if (!myFile.exists) { return theWords }
        // File exists, so use it instead
        myFile.open("r");
        var importedWords = myFile.read();
        myFile.close();
        return importedWords.split("\n"); // Could filter these, but what's the point?
    function getScriptPath() {
        // This function returns the path to the active script, even when running ESTK
        try {
            return app.activeScript;
        } catch(e) {
            return e.fileName;
    function isIn(aList,aWord) {
        for (var i = 0; aList.length > i; i++) {
            if (aList[i].toLowerCase() == aWord) {
                return i;
        return -1;
    function InitCap(aWord) {
        if (aWord.length == 1) {
            return (aWord.toUpperCase());
        return (aWord.substr(0,1).toUpperCase() + aWord.substring(1,aWord.length))

    Hi,
    Looks like it is a 'paragraph mark' problem which can be seen as 1st char in some strings.
    modify these two lines:
         theWordRanges = myText.split("\r");
         app.selection[0].texts[0].contents = theWordRanges.join("\r");
    Jarek

  • Proper Title case

    Hello,
    I need to convert description into the title case, i.e. first letter of each word should be capitalized. INITCAP is almost good for it, except that it also capitalizes first letter after apostrophe
    SELECT INITCAP('ken''s food near mc''donalds in o''hare''s oasis') FROM DUAL; gives you
    Ken'<font color="red">S</font> Food Near Mc'Donalds In O'Hare'<font color="red">S</font> OasisFinally I build this:
    SELECT REPLACE(initcap(REGEXP_REPLACE(TRIM('ken''s food near mc''donalds in o''hare''s oasis'), '('')(.)( |$)', chr(254)||'\2\3')), chr(254), '''') FROM DUAL;it works as expected
    Ken's Food Near Mc'Donalds In O'Hare's OasisIs there more elegant solution?

    did you put one there so that initcap would correctly capitalize it? Yes. I just want to be sure that structures like "O'Brian", "O'Henry" etc, where apostrophie is within first 3 bytes, are capitalized and if apostrophie is within last 2 bytes "Ken's" then it is not capitalized

  • Grep Title Case

    There is a very useful discussion (http://forums.adobe.com/message/4269565#4269565) on getting a paragraph style (e.g. for headings) to produce Title Case by specifying a Grep style (which comes down to using a caps character style and the grep expression \s\S). Is there a way of restricting this to words of four or more letters? That would produce a better Title Case, without 'by', 'a', 'an' etc. having a capital. That discussion does suggest a list of exceptions, which works, but my list is getting rather long. 

    (?<= )\w(?=\w{3,}) as the query string will find any word character preceded by a space and followed by three or more word characters.

  • IDCS Title Case Paragraph Style

    Hi, I'm trying to create a paragraph style That Uses Title Case but my only choices are "Normal", "Small Caps", "All Caps", or "Open Type All Small Caps". I see "Title Case" under the menu: Type > Change Case but not in the paragraph or characters styles dialog box. Any Help Would Be Fantastic. Thanks!

    My Running Headers plug-in has smart title case which gets its words
    based on two different user definable lists: One for lowercase words
    (unless they are at the start or different because of one of the other
    rules...) and another for acronyms and the like (they are always
    capitalized exactly as they appear in the list independent of position).
    InDesign can't even spell its own name! ;)
    I hope to add the smart title case to my Formatting Tools as well. (If
    there's enough interest, I'll probably do it sooner rather than later...) :)
    Dominic that's an excellent point about acronyms which are also words --
    one I hadn't thought about. I believe those can be identified by some
    kind of formatting attribute...
    Harbs

  • Title Case iWork Numbers

    I have a spreadsheet that contains several columns of text which are all uppercase. I would like to format the text so that it has a capital first letter, and the subsequent letters are lower case for that word. The "Title" case which is found in Format>Font>Capitalization>Title Case only seems to work if the text is all lower case. I can't get it to work on any other types of formatted text. Any thoughts on how I can do this? Thanks

    I use an AppleScript to change to title case in Pages. This is based on an old AppleWorks script that I've modified for Pages. Copy & paste your table from Numbers to a blank Pages document then open AppleScript Editor (in Utilities) & paste the following code in a new window & save as a script. You can then run it to convert the text & then copy & paste back to Numbers.
    Give me a couple of days & I'll see if I can make it work in Numbers.
    property lowerOnlyWords : {"a", "an", "the", "and", "of", "for", "from", "in", "on", "before", "after", "between", "behind", "with", "without", "to", "through", "against", "is"}
    property upperChars : "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    property lowerChars : "abcdefghijklmnopqrstuvwxyz"
    tell application "Pages"
              try
                        set selectionFail to (count each document) < 1 or class of selection is not text
              on error
                        set selectionFail to true
              end try
              if selectionFail then
                        display dialog "You must select some text in a word processing document before running this script."
              else
                        set theText to selection
                        set theWords to {} & every word in theText
                        set wordCount to count theWords
                        set isFirstWord to true
                        repeat with wordN from 1 to wordCount
                                  set oldWord to word wordN in theText
                                  set doLowerOnly to oldWord is in lowerOnlyWords and not isFirstWord
                                  if doLowerOnly then
                                            set startLowerN to 1
                                  else
                                            set startLowerN to 2
                                            set oldCharacter to character 1 in oldWord
                                            set alphaN to offset of oldCharacter in lowerChars
                                            if alphaN > 0 then
                                                      set character 1 in word wordN in theText to character alphaN in upperChars
                                            end if
                                  end if
                                  repeat with charN from startLowerN to length of oldWord
                                            set oldCharacter to character charN in oldWord
                                            set alphaN to offset of oldCharacter in upperChars
                                            if alphaN > 0 then
                                                      set character charN in word wordN in theText to character alphaN in lowerChars
                                            end if
                                  end repeat
                                  set isFirstWord to false
                        end repeat
      select theText
              end if
    end tell

Maybe you are looking for

  • Where condition for a column in BMM

    Hi Gurus, I have a requirement where in the BMM(The LTS for this logical table is say 'Fact'), I need a logical column with the following definition. count(Dim.status) where Dim.status = ' Accepted' (I didnt add the Dim table to the LTS yet, should I

  • CRM 5.0 - Non ERMS Email to ERMS Email

    Hi Gurus We are switching from using Non ERMS E-mail processing to ERMS E-mail processing. The current Non ERMS set-up works without issue but we want to take advantage of the ERMS functions. We are using the same e-mail addresses so in theory, after

  • Converting subscription from a country to a region

    I recently  bought a subscription unlimited calls to landline Germany for 3 months , I wonder if I can convert it to be unlimited calls landline to Europe with paying the difference of money unlimited calls to Germany landline costed 142 SEK , a pric

  • WHERE IS FLASH? I AM EMBARRASSED

    I am embarrassed as an iPhone owner that we still have no Flash support. This is ridiculous. I am sure there are some robot answers as to why this has not happened yet. Can anyone provide me with a REAL answer. This is ridiculous.

  • OS X 10.6 Upgrade

    I have a mac book pro with 10.5.6, I bought Dragon Dictate, it tells me that i have to upgrade to 10.6 Is this a simple upgrade or will my computer experience a loss of settings or data? I have too many important files to risk any changes Do I have t