First character in each word

Hello All,
I want to get the first character of each word:
If I have "Statement To Be Parsed" so i want a query to return STBP.
Your help please

Hi,
NB wrote:
Hello Franck,
One more thing i have the below case which is not covered
"Test STMT Func/ Brg E.O.D Act ON LINE/ Ext" i want it to be TSF/BEAOL/E
please your help againINITCAP conisders '.' to mark the end of a word, so INITCAP ('E.O.D.') returns 'E.O.D.' (all capital letters). If you want to ignore '.'s, so that you get 'Eod' (only 'E' capitalized) as a result, then use REPLACE (or some other string manipulation function) to get rid of the '.'s before calling INITCAP.
REGEXP_REPLACE (str, '[^A-Z]') returns a copy of str with all characters except those indicated inside the square brackets removed. If you want other characters (such as '/') kept, then just add them to the list inside the square brackets, like this:
SELECT     REGEXP_REPLACE ( INITCAP ( REPLACE ( 'Test STMT Func/ Brg E.O.D Act ON LINE/ Ex'
                 , '[^A-Z/]'
                 )     AS inits
FROM    dual;Output:
INITS
TSF/BEAOL/E

Similar Messages

  • How to capitalize the first letter of each  word in a sentence?

    Can anyone please explain how to split a sentence at a comma, or space or hyphen in to words and capitalize the first letter of each word. But I don't know how many words the sentence contains.

    HI,
    data : begin of itab occurs 0,
             words(40),
             end of itab.
    data : v_sentence(1000).
    data : lv_firstchar.
    split v_sentence at ',' into table itab.
    loop at itab.
    translate itab-words+0(1) to upper case.
    modify itab index sy-tabix.
    endloop.

  • Is there a command to capitalize the first letter of each word?

    That is to say, can you capitalize the first letter of each word in a document like say, word? Or using the net?
    Thanks guys.
    (hope that makes sense.)

    Select the text, then Format->Change Case->Title Case (Word 2004).

  • Replacing first Character of every word in a string with an Uppercase

    Hi,
    Is it possible to replace all first character of every word in a string with UpperCase?
    $="autocad lite"
    Should look "Autocad Lite" .
    Thanks,
    François

    Hi FRacine,
    Please refer to the script below:
    $givenname="autocad lite"
    $givenname
    $givenname = $givenname.substring(0,1).toupper()+$givenname.substring(1)
    $givenname
    Edit: to change first character in every word, please refer to this script, this may not be the best way, but it can work:
    $givenname="autocad lite"
    $givenname
    $words=$givenname.split(" ")
    $givenname=""
    foreach ($word in $words){
    $givenname+=$word.substring(0,1).toupper()+$word.substring(1)+" "}
    $givenname=$givenname.trim()
    $givenname
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • Extract First letter from each word

    Hi All,
    I have a requirement to extract first letter of each word as shown in below example
    input: abcd output: a
    input: abcd efgh output: ae
    input: abcd efgh ijkl output: aejany help will be highly appreciated
    I am on db version 11g

    jeneesh wrote:
    Just a note - This will not take care of spaces at the end of the line..You're right, and not just spaces but any non-word characters. Here is fixed solution:
    with t as (
               select 'abcd ' str from dual union all
               select 'abcd efgh.' from dual union all
               select 'abcd efgh ijkl,' from dual union all
               select ' a abcd efgh ijkl! ' from dual
    select  str,
            '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      from  t
    STR                 INITIALS
    abcd                [a]
    abcd efgh.          [ae]
    abcd efgh ijkl,     [aei]
    a abcd efgh ijkl!  [aaei]
    SQL> BTW, oldie_63's solution takes care of spaces but not:
    with t as (
               select ' abcd' str from dual union all
               select '.abcd efgh' from dual union all
               select ',abcd efgh ijkl' from dual union all
               select '! a abcd efgh ijkl' from dual
    select  str,
            '[' || trim(regexp_replace(str,'(\S)\S*\s*','\1')) || ']' initials
      from  t
    STR                INITIALS
    abcd              [a]
    .abcd efgh         [.e]
    ,abcd efgh ijkl    [,ei]
    ! a abcd efgh ijkl [!aaei]
    SQL> Also, OP needs to clarify what to do with hyphenated words:
    SQL> with t as (
      2             select 'sugar-free' str from dual
      3            )
      4  select  str,
      5          '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      6    from  t
      7  /
    STR        INITIALS
    sugar-free [sf]
    SQL> with t as (
      2             select 'sugar-free' str from dual
      3            )
      4  select  str,
      5          '[' || trim(regexp_replace(str,'(\S)\S*\s*','\1')) || ']' initials
      6    from  t
      7  /
    STR        INITIALS
    sugar-free [s]
    SQL>Or words like:
    SQL> with t as (
      2             select 'O''Reily' str from dual
      3            )
      4  select  str,
      5          '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      6    from  t
      7  /
    STR     INITIALS
    O'Reily [OR]
    SQL> with t as (
      2             select 'O''Reily' str from dual
      3            )
      4  select  str,
      5          '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      6    from  t
      7  /
    STR     INITIALS
    O'Reily [OR]
    SQL> SY.

  • [CS2/CS3 JS] Finding the first character of each paragraph

    Hi,
    Can anybody help with my script below:
    for (h=0; myParaCount>h; h++){
    myChars = myStory.paragraphs.item(h).contents;
    if (myChars.characters.item(0) == "l" && myChars.characters.item(0).appliedCharacterStyle == CharStyleWin){
    myStory.paragraphs.item(h).appliedParagraphStyle = "L-B";
    This script is supposed to test if the first character is an "l" with my character style "Wingdings" applied to it. I could not test whether the character style is "Wingdings" or not. What could be wrong with my script. Thanks.

    // You need to have a textFrame selected
    var myFrame = app.selection[0];
    var myParaCount = myFrame.paragraphs.length;
    // There must exist a paragraphStyle name L-B
    var myApplyStyle = app.activeDocument.paragraphStyles.item("L-B")
    for (h=0; h < myParaCount; h++){
    var myChar = myFrame.paragraphs.item(h).characters.firstItem();
    // check if first char is "l" and if its applied charstyle name is CharStyleWin
    if (myChar.contents == "l" && myChar.appliedCharacterStyle.name == "CharStyleWin"){
    myFrame.paragraphs.item(h).appliedParagraphStyle = myApplyStyle;
    /* Edited at 11.21 */

  • Is there a way to auto capitalize the first letter of every word?

    I Like To Type In This Way. I Was Wondering If There Is A Setting That Will Automatically Capitalize The First Letter Of Each Word So That I Don't Have To Keep Hitting Shift Before Each First Letter.
    Thank You

    AdamMarshall wrote:
    Nice to see so many 'helpful' responses.
    This casing is useful for example, on an Address field. It would be good if the OS had this option for developers.
    I'm pretty sure it does as I've certainly had apps that, in certain fields, do use title case.

  • TestStand database logging problem: only the first character is put in the table.

    I am using TestStand 2.0.1 and Microsoft SQL server database. There is a weird problem when I use database logging. At first, all the database logging ran good.
    Then one day after I moved the test equipment to production line, TestStand only logs the first character of each string field in the tables! There is no error message.
    I setup another SQL server running locally on the same machine as the TestStand is and move the database to the local server, database logging has no problem. Schemas in TestStand Dabasebase Options are the same.
    I tried to run TestStand from another computer on the network. There was no problem before, too.  But now, TestStand always shows a Run-time error message like this:
    Details:
    An exception occurred calling 'LogResults' in 'ITSDBLog' of 'DBLog 1.0 Type Library'
    An error occurred executing a statement.
    Schema: New.
    Statement: STEP_RESULT.
    Connection failureMultiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    Source: TSDBLog
    Error Code:
    -2147467259; User-defined error code.
    Location:
    Step 'Log Results to Database' of sequence 'Log To Database' in 'Database.seq'
    I have checked that the connection is good and also the table UUT_RESULT has been logged correctly.
    Anyone can help?
    Thanks.

    Thank you very much, Santiago.
    Yes, I have a customized schema, but it is based on the pre-existing schema. I tried the schema:TS 1.x Access/SQL (NI), which  came with TestStand, the results were the same. 
    I have tried to run different sequences. On one computer, I always get only the first character of each string entry logged in the remote database, however for the local server, everything is fine. On the other computer, there is no local SQL server, I always get similar error message as I mentioned in my post. The sequence step reports error is  "Log Results to Database".
    Any more suggestion?
    Thanks again.
    Best regards,
    Jaso

  • The first character I type often ends up at the end of the word.

    It's been going on since at least Snow Leopard, I'm on a clean Lion install now. It happens relentleslly in Safari. When I type in a search or fill a form on a webpage - even something simple as google, the first character I type often ends up at the end of the first word I type. Sometimes it ends up in the middle. If anyone esle has even observed it, i'd like to hear just to confirm I'm not mad.

    See:
    * http://kb.mozillazine.org/Deleting_autocomplete_entries

  • How can a  variable display the first character that's on the page?

    I'm creating a telephone directory and want each page to display the alphabet of the first listing on the page on the top - only one character.
    Can you tell me how to do this?

    Hmmmmm, seems I was wrong about the GREP styles. I just tried it and they don't get picked up. I consider that a bug, but it's probably "as designed."
    That leaves you having to work with nested styles only, or Find/Change. I think what you'll need to do is redefine the Paragraph style so it has two nested styles that apply the correct style to whatever needs to be styled at the start of the paragraph, one for the first character and the second for the rest of the word(s) if you can figure out a trigger (can InData add an end nested style character or is thew some punctuation you can use?), then find/change to remove the applied character style. For that I'd serach for ^.+ with the find format set to the character style that InData applied and the chane format set to [None], which will only remove it from the beginning of your paragraphs. If this is done correctly there will be no change in appearance since the redefined paragraph style will do the formatting.
    If that won't work, you can use find/change to apply a new style to the first characters. Search for ^. and set the change format to the new character style that you'll use in the variable. It needs to have the same attributes as the style applied by InData or the appearance will change.
    The second method is probably easier since you don't need to redfine the paragraph style, but both methods require you to use find/change to alter the text, which means if more text is added you'll need to re-do the find/change. Not a big deal, but don't forget. I'd be tempted to wait until the last minute and just ignore the headers for the moment, if editing is ongoing. I'd also test this on a copy of the file for safety.

  • How to display a particular character  of a word

    Hi,
    can anyone tell me how to display  a particular character of a word in smart forms,Ex:suppose word is India and i want to display character d..
    Thanks in advance.
    Rajesh

    please look at the below explanation:
    DATA: VAR TYPE CHAR20.
    VAR = 'INDIA'.
    WRITE:/ VAR(3) - THIS WILL PRINT FIRST THREE CHARACTERS OF THE INDIA SO THE OUTPUT WILL BE : IND
    WRITE:/ VAR+3(1) = THIS WILL PRINT 1ST CHARACTER AFTER FIRST 3 CHARACTERS SO THE OUTPUT WILL BE : I
    COPY REQUIRED CHARACTERS IN ANOTHER VARIABLE.
    DATA: VAR2 TYPE CHAR10.
    VAR2 = VAR+3(2) .

  • Styling first letter in each line differently [was: Dreamweaver cs4 question]

    I am trying to change the font in a group of text, I want to change the first letter of each sentence to a large size and different color and when I do this it changes the entire  paragraph in the div, so how can I change the attribute of one letter in a word? Example: See how the first letter of each sentence spells out earth?  I want to make those letters to stand out.  CAN ANYONE TELL ME HOW TO DO THIS??????
    Ensuring compliance with relevant environmental legislation and regulations.
    Achieving and reviewing our set objectives and goals with continual improvements.
    Reducing environmental pollution by reducing, recycling and re-using by-products and waste.
    Training and communication to all our staff to participate and achieve environmental excellence.
    Having our environmental policy documented, implemented, maintained and made available to the public and interested third parties.
    Thank you in advance
    [Subject line edited for clarity by moderator]

    Your question went unanswered for nearly a day because of the meaningless subject line you used. Please take a moment to read How to get help quickly.
    There are a couple of ways to achieve what you want. The way I would do it is to make each line a separate paragraph, and wrap them in a div with an ID called "earth". The following CSS style rule will make the first letter of each paragraph 24px tall and green:
    #earth p:first-letter {
      color:#090;
      font-size:24px;
    This uses the first-letter pseudo-element and applies it to all paragraphs in the earth div.

  • How to find no of bytes per character in a word - Urgent need

    Hi,
    I have some data in the database with chinese characters. I want to know how many bytes per each character in a word and get the total bytes.
    Is there any built in Oracle function or anything where i can get no of bytes for each character or a word.
    I am not able to find the solution anywhere.
    Any help is appreciated.

    Hi,
    You can use LENGHTB function.
    SQL>SELECT LENGTHB(dummy) FROM DUAL;
    LENGTHB(DUMMY)
                 1
    1 row selected.
    SQL>Regards

  • Adobe Flash CS5 - help needed animating a sentence so each word fades in seperately

    I am attempting to make a simple music video.
    My aim is to have lyrics to the piece of audio appear in synchronisation.
    There does not seem to be a simple way to fade in (and out) each word singularly allowing the alignment and sentence position to remain constant.
    Please help.

    Put the words on the stage as you want them to show when completed. Set that layer in the timeline as a masked layer. Add a new layer on top of that layer, set it to be a mask layer. In this new layer draw a rectangle that covers just the first word of your text. Move down a few frames and add a new keyframe to the mask layer. At this keyframe make the rectangle larger, to cover two words. Repeat as needed until all of the words are covered.
    Here is a link to a video that shows something similar: Flash Masking Tutorial - YouTube

  • Copy/Paste Dropping First Character

    The first character is dropped every time I copy and paste a block of text in Word (2008) and Photoshop CS6, but strangely not in my email client or Google Docs. I am using an iMac running OS 10.9.5. Has anyone else ever encountered this, or does anyone have any suggestions for a remedy? Thanks!

    http://forums.adobe.com/message/4248993

Maybe you are looking for

  • Spiked CPU when viewing multiple streams one at a time then publishing

    Hi all, We're finding the Flash Player's CPU process 'ratchets' slightly higher each time a user views a new webcam stream one at a time in a WebcamSubscriber. For example, I'm watching the stream for User A, then that stream is deleted and I then wa

  • Is there any way the Creative Cloud desktop app can indicate which Market items have already been downloaded?

    Hi, I'm not sure whether this is a general issue with the Creative Cloud desktop app, or something is going wrong with my installation, but I receive seem to receive no indication that I have already downloaded an item when I open CC --> Assets --> M

  • Load Balancing for Oracle Apps in linux

    Dear all, I need anykind of information for load balancing (how to do it - architecture) for oracle application in linux environment. Just for info, the database will be on linux too using RAC (3 machines). I have 4 machines to be use as application

  • Pricing Date determination

    2.      is it possible to have a calculation rule for each customer. For example Customer A pricing date based on delivery date; Customer B pricing date based on goods issue I date

  • Photos off Imac G3

    Hi guys, Here is my problem, I need to get 200 or so photos off of an old Imac G3. It is the first model so there are some limitations. No cd burner, no firewire, OS 9.2, and only usb 1.1, it was in an electrical accident so the ethernet port is frie