First character of each word

Hi all

I want to get the first character of each word:

If I "Statement analysis", so I want a query to return PBTS.


Your help please

Hello

Here's one way:

SELECT     REGEXP_REPLACE ( INITCAP ('Statement to be PARSED')
                 , '[^A-Z]'
                 )     AS inits
FROM    dual;

Output:

INIT
----
STBP

INITCAP is an easy way to capitalize the first letter of each word (and ensure that no other letters begin with a capital letter).
REGEXP_REPLACE is an easy way to delete all the characters except the captial letters.

Tags: Database

Similar Questions

  • Extract the first letter of each word

    Hi all

    I have a requirement to extract the first letter of each word as shown in the example below
    input: abcd output: a
    input: abcd efgh output: ae
    input: abcd efgh ijkl output: aej
    any help will be much appreciated

    I'm on the 11g version of the db

    Depends on your definition of a "word", but for example:

    SQL> select trim(regexp_replace(' a abcd efgh ijkl','(\S)\S*\s*','\1'))
      2  from dual
      3  ;
    
    TRIM(REGEXP_REPLACE('AABCDEFGH
    ------------------------------
    aaei
     
    
  • How to take advantage of the first letter of each word in Mysql

    Hello

    I tried to put a large database where visitors have been botched when entering text. The main thing I want to do is to capitalize the first letter of each word in Mysql.

    I found the code below in PHP, but it continues to find an error on the TIME line:

    <? PHP ini_set ('display_errors, 1');? >

    <? php require_once('Connections/maison_connection.php');? >

    <? PHP

    $result = mysql_query ("SELECT column, id FROM table");

    While ($row = {mysql_fetch_array ($result))}

    $id = $row ['id'];

    $column2 = ucwords ($row ["column"]);

    $query2 = "UPDATE table SET column = ' $column2′ WHERE id = '$id" ";

    mysql_query ($query2);

    }

    ? >

    My table is called mailing list and the column name is called, so I modified the script to do this: but it still shows the same error while:

    <? PHP ini_set ('display_errors, 1');? >

    <? php require_once('Connections/maison_connection.php');? >

    <? PHP

    $result = mysql_query ("SELECT name, id FROM mailing list");

    While ($row = {mysql_fetch_array ($result))}

    $id = $row ['id'];

    $Name2 = ucwords ($row ['Name']);

    $query2 = "UPDATE LISTSERV SET name = ' $Name2′ WHERE id = '$id" ";

    mysql_query ($query2);

    }

    ? >

    Any ideas?

    
    

    The key is to use a multidimensional array. The first time the while loop runs through the database results, $i is 0, so the values are assigned to the $updates [0] ['id'] and $updates [0] ["Name"]. The following becomes $updates [1] ['id'] and $updates [1] ["Name"] and so on.

    The loop resets $i to 0, and uses count ($updates) to get the length of the array. It then updates each row by using $updates [0] ["Name"] and $updates [0] ['id'], $updates [1] ["Name"] and $updates [1] ['id'] and so on.

  • read the first character of each line

    Hello!

    I have a problem with the reading of a text file in LabView which I think is pretty easy to do, but since I'm really new to labview (and programming at all) I'm having a hard time to understand.

    So basically, I use the VI 'write file to measure' to write some test results to a text file. I'm just the ones and zeros so the text file looks something like this:

    1.00000

    0.00000

    1.00000

    ..

    and so on.

    I would then import these values in labview but I don't want decimals and I would like that everything on the same line, something like this:

    1 0 1 0 etc etc.

    (the idea is to then be able to convert the values to a hexadecimal number 1-F, if for example the above entry would result in 6.)

    I tried to use the function of text file reading, but I don't know how to convert then the entrance of my desired format.

    Also if you have any idea on how to start playback at the first 1, and then read the next 4 entries contact that would be great as well.

    Any help is really appreciated!


  • How a variable may display the first character that is on the page?

    I'm creating a phone book and each page to see the alphabet the first listing on the page on the top - only a single character.

    Can you tell me how to proceed?

    The thing, of course, is how to apply the character style.

    You'll want to have she asked the first character of EACH list so that headers update when you change and if you do not need to go through page after page by applying the style. You can do this with a nested Style applied through 1 character as the first litter of style in your paragraph style definition (and this character style has no need of any other than a name defiintion of work for this), or, if you already have some nested styles, you can use GREP as well as nested styles style. You would use ^. as the string to match. This means that the first character of a paragraph.

    The same work of techniques for a whole word wil. For nested style, change to 1 character through 1 word for GREP change to ^ [\u\l]+ which is any combination of upper and lowercase letters the latter at the beginning of a paragraph, but stop matching when it hits a number, punctuation or spaces.] If you have numbers in the lists to be used, you can add \d to the class in the above GREP.

  • Change the case of the first character in the lists in InDesign CS6

    Hello

    I have a few long documents that contain lists that look like this:

    • Lorem ipsum dolor sit amet, 195kgs Adipiscing elit
    • SED turpis elementum hendrerit lacinia lorem convallis
    • sed has nibh tortor non commodo lobortis sed felis.

    Now I need to make the first character in each list of capital letters, IE:

    • Lorem ipsum dolor sit amet, 195kgs Adipiscing elit
    • SED turpis elementum hendrerit lacinia lorem convallis
    • Sed has nibh tortor non commodo lobortis sed felis.

    The problem is there is a CAP in the lists that must be maintained, and I can't create a list of exceptions (words to ignore).

    Is it possible to change only the first character in the list in capital letters?

    The lists are in style.

    Any help would be appreciated, thanks :-)

    Hello

    This will make real ceiling, but it is not dynamic.  It could be made dynamic with an event listener, but it's probably not worth.

    Be sure to change the names of paragraph on script style

    // By Trevor http://forums.adobe.com/thread/1068926?tstart=0
    #target indesign
    #targetengine main
    app.doScript("main()", ScriptLanguage.javascript, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Capitalise Lists By Paragraph Styles");
    function main()
    {
    var  myDoc=app.documents[0],
           myStyles = ["Paragraph Style 1", "Paragraph Style 2", "Paragraph Style 3"], // change to correct style names
           l = myStyles.length, myFinds = [], fl;
    
    app.changeGrepPreferences = app.findGrepPreferences = null;
    app.findGrepPreferences.findWhat = "^\\l";
    while (l--)
        {
        app.findGrepPreferences.appliedParagraphStyle = myDoc.paragraphStyles.itemByName(myStyles[l]);
        myFinds = myDoc.findGrep();
        fl = myFinds.length;
        while (fl--) myFinds[fl].contents = myFinds[fl].contents.toUpperCase();
        }
    }
    
  • Acrobat form - how to take advantage of the first letters of the words of field.

    I produced my first Acrobat form and am setting the validation rules on certain fields.  I want to ensure all names and addresses are saved with the first letter of each word being a capital as well as the letters are lower case.   While I found and read a few reviews, I have no script experience and positions assume a reasonable understanding of scripting, debugging, etc.

    Could someone please explain how I can achieve this.

    Thank you

    You must understand how the data will be entered and what you want to accomplish. If you want to have a function as title case, then you will need to adjust objects or other words that would not be capitalized. Users will use another character other than a space to separate words?

    Since it is an action of formatting, I would put the script as the custom format or a validation script, so that this code is not rerun each time a field used in a calculation is updated.

    Assuming that only a space character will separate the words, you can use the method '. split() ' to an array of words in the text entered in a field. You can then browse the array of words and affecting the first uppercase character and the rest of the word in lowercase, using the 'substr()' method or other methods of the property of type string.

    The simplest version of this could be:

    aInput var = event.value.split(""); make a table divided in space
    var sCharacter = ";
    Sword of var = ";

    for each element of the word table, uppercase the first letter
    for (i = 0; i
    aInput [i] = aInput [i] .substr (0, 1) .toUpperCase () + aInput [i] .substr (1). toLowerCase();
    } / / end of loop for the input string
    rebuild the input string with words changed with spaces
    Event.Value = aInput.join(' ');

    But since you will repeat this code in several areas, I would create document-level functions, so the code is in one place and be interpreted pre and run faster:

    function UpperCase (sString) {}
    Return sString.toUpperCase ();
    }

    function LowerCase (sString) {}
    Return sString.toLowerCase ();
    }

    function FirstUpperCase (sInput) {}

    aInput var = sInput.split(""); make a table divided in space
    var sCharacter = ";
    Sword of var = ";

    for each element of the word table, uppercase the first letter
    for (i = 0; i
    aInput [i] = uppercase (aInput [i] .substr (0, 1)) + LowerCase (aInput [i] .substr (1));
    } / / end of loop for the input string
    rebuild the input string with words changed with spaces
    Return aInput.join(' ');
    }

    You can then use the following code in each domain where you want to force the first character uppercase:

    Event.Value = FirstUpperCaseinputinputletter for (event.value);

    Another solution would be to use the following code in the format or validate the script:

    Event.Value = event.value.toLowerCase () replace (/ \b\w/g, function (match) {return match.toUpperCase () ;});})

    This script uses the RegEx object and its method of ". replace() ' using a self funciton set with the corresponding string.

  • make the first line of each paragraph "BOLD"

    Hi all

    I read this forum, but I can't really find the answer, I need.

    Here's my problem, we intend to automate the flow of text in our Organization, that's what I have to do

    -read the input from the story of a database

    -flow text into a text box in particular for example 4.5 cm wide

    -each paragraph will be had 2 new lines

    -Select the first line of each paragraph then putting in bold.

    in the above list, I can do everything except the first paragraph selection and putting in bold. I am looking for the selection of text I see there is a function called textframe.select?

    Can someone help me with this please?

    This severely reduced your options. (Which reminds me, you can specify a detail important like that from the beginning the next time.)

    The simple solution would be to apply your "BOLD" font (or better: a character style) in the first line of each paragraph by using the property of a paragraph .lines. UH customary ‑‑ link to the HTML version of the omitted OMV, it seems I'm not coming back as much as CS2... (Is there a CHM for it to http://www.jongware.com/idjshelp.html).

    This should work:

    App.Selection [0] .paragraphs [0]. Lines [0] .appliedCharacterStyle = "YourBoldCharStyle";

    ... With your cursor in the paragraph you want to change. Will adjust to meet your specific needs.

    There is a drawback of the simple method. Unless you use a special police who makes bold with the same width as her (quite rare) usually, the text will be redistributed after he applied. So there are one or more words in bold on the next line, so you must remove the tank style "BOLD" of those. But! At that time InDesign may determine that these non-bold words may go back on the first line!

    Well written code does not help, because it could be possible the same word oscillates backwards with each change between the first and the second line, each time to cheat... At * some * point you'll have to help the poor ID a bit; perhaps to fix this first line with No Break applied.

  • How the auto uppercase the first letter of each sentence

    I use the latest version of the Pages on the Sierra of the OS and I am trying to find a way to automatically capitalize the first letter of each sentence with nothing doesn't. I've been a user of Pages for years and every time announced a new update is all what I care about is adding this feature simple but important. So, now that the new update is here I can not yet understand how to take advantage of the auto and I can't find workarounds online to help me do it. Any idea?

    You can use WordService from DEVONtechnologies, free in the Mac App Store. You can then go to System Preferences > keyboard > shortcuts > Services & enable those you want. You can then select the text you want to apply the service to & go to Pages > Services & select initial caps of sentences. It is also possible to assign a keyboard shortcut to services. With the help of this device, or similar functionality in any word processing application still not to revert to words in a sentence that should be capitalized as 'I' or pronunciations. You will also have the problem of it capitalized words after the period for the abbreviation.

    I do it the traditional way, using the SHIFT key when necessary. It is advisable to learn to type using the SHIFT key, rather than relying on the software to do it for you. Just like the use of a spellchecker. It's good, but it will not go back on the words that are spelled correctly but not the correct spelling of the situation.

  • On Windows 7, how to implementing automatic uppercase the first letter of the first book and the first letter after each period?

    I'm using Windows 7, how do I configure my system automatically capitalized the first letter of the first word and the first letter after each period?

    Thank you

    Lisa.

    Hello Lisa,.

    It's more to do with the word processor on Windows. You don't say what word processing software you use. If you use WordPad which comes free with Windows, it is impossible to do what you want to do. However, if you are using Microsoft Office Word (that you can buy) then the CAP is set by default.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Expert - consumer: www.winuser.co.uk | vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com

  • Problem with the tool of markup for text editing in Adobe Pro XI on a Mac automatically remove the first character

    When I use the markup of text editing tool, I pointed out a word/phrase/sentence and then start typing in the replacement, the first letter is automatically highlighted and then removed when the second letter is typed. Thus, each word/phrase/sentence I type is missing in his first letter. Very annoying and has just started happening recently.

    Someone else encountered this?

    No idea how to solve this problem?

    I use a Mac.

    Hi LPerkins,

    The issue that you are facing is known for us and a Bug was registered for the same.

    The engineering team works to its difficulty. This only happens on Mac and on Windows.

    Kind regards

    Rave

  • TextBox multiline missing the first character after the new line

    Hello, I do a pdf report that swaps 2 pages back (the content is the same except for one table), essentially what happens when you click on the button 'page swap' is:

    1. get all the values of the fields in the page that will be deleted in a table "buffer".
    2. delete the page
    3. Insert the other page
    4. Fill out all field values values in the buffer

    So the thing is that in line with several text boxes is missing the first character each new line after this process if I change the content, if I do not change the content, while I share the pages and transfer field values, it makes it ok, it doesn't matter what line change it and how many lines I change in the text box together multiline each new line, I get a character less at the beginning of a new line (except for the first character of the first line).

    I'll try to work program autour with text.replace ('\n', '< br >') or something if I miss a few key configuration for this.

    I use Acrobat Pro 11.0.06 on a Windows 7 Professional client on a 20(3.13.10-200.fc20.x86_64) of Fedora host.

    Thanks in advance

    If you remove the option of formatting rich text for the field, it works fine. "In addition, I don't understand why you need the whole thing to replace line breaks with.
    "tags...". It is not at all necessary.

  • Capitalize first letter of each new sentence

    Hi guys,.

    I'm working on a drawing or model for a magazine that, for now, I need to type a large number of texts in InDesign instead of copy - paste from word or...

    It made me a bit annoyed because I don't get uppercase every first letter of each sentence automatically like Word etc?

    So: How can I automatically uppercase the first letter of each sentence?

    Thank you very much

    Bob

    Edit/Preferences/correction auto/enable auto/correction correction automatic capitalization errors.

  • It began to appear in the first inch of each merchant site I visit with the new version, "Congratulations!" Every $5 spent at JCPenney saves you a chance to win a $500 gift card. I have run scans and nothing appears not infected, but I do not understand t

    It began to appear in the first inch of each merchant site I visit with the new version, "Congratulations!" Every $5 spent at JCPenney saves you a chance to win a $500 gift card. I have run scans and nothing appears not infected, but I don't get that annoying block in Internet Explorer. I uninstalled and reinstalled firefox and when I did, the first thing is present at his inauguration was a message that says: "you have joined the shop now...". "something or another and I had to click OK, it was a microsoft OK message. How can I get rid of this?

    URL of affected sites

    http://www.BestBuy.com, target.com, any site of retail trade

    Your problem can be caused by Malware. You can run and update according to free anti-virus software:

    1. Malwarebytes (free version) - http://www.malwarebytes.org

    2. Spybot Search & Destroy - http://www.safer-networking.org

    3. Spyware Terminator - http://www.spywareterminator.com

    In addition, there are a number of forums, you can use to help get rid you of your infection. It is:

  • Lose the first character in the e-mail address

    When I go to enter an e-mail address, I start typing the address in the required field.  When I type '@', the first character of my e-mail address disappears from the input field.  For example, I type 'jstewart' and when I type the symbol @, the letter 'j' disappears.  This happens on all websites and happened the last 2-3 months approximately.  Someone has an idea what is the cause?

    In the menu bar, you select

    Change ▹ Substitutions

    and uncheck all the options. Test. If the problem is resolved, you can experiment with the reactivation of some options to isolate further the cause. You can change text replacements tab in the keyboard preferences window text.

Maybe you are looking for

  • Firefox will not play mp3 on a website

    my computer at work has only ie8, when I go on a website that it plays music incorporated without problem. When I go on the site even with my laptop using firefox 9.0.1 it will not play

  • PCI bus 0, device 2, function 1

    Hello I have a problem with my video controller device driver after installing windows 7 (from windows xp)information about the location: PCI bus 0, device 2, function 1Hardware ID: PCI\VEN_8086 & DEV_2792 & SUBSYS_3081103C & REV_03Full name: other d

  • HP dv72173 cl wireless module

    Hello, I have the model above, which runs on Windows 7. About 3 weeks ago I initially lost wireless connectivity. As a result the 701 error message appeared - "wireless module is not installed properly or does not work". I tried the hard reset and sh

  • Problem with encryption on the device, of course Simulator

    Morning, I work with encryption and posting data to a web service. It works fine on the Simulator, but when posting to a service connection on the device, I get an error "Invalid Credentials", which I think is caused by the encryption does not proper

  • Avoiding Rich black in the files for printing

    Situation: One our vendors with which I work is printed paper, which suggests no black rich in PDF files or files HAVE.Problem: Despite a palette limited (in which I use 100% black, white and a range of primary colors), the definition both a Rich Bla