Taking the first word only

Hello, I got a single column, I just want to take only the first word of this column

Column of blabla
Hello how are there you?

Please tel me how I can take only first Hello there and if I want to take the second word in the first place that should I do thank you
SQL> with t as
(
 select 'Hello how are you' str from dual union all
 select 'God bless you' str from dual union all
 select 'Take care my love' str from dual
)
---
---
select str, regexp_substr(str,'\w+') str1, regexp_substr(str,'\w+ +\w+') str2 from t
/
STR               STR1              STR2
----------------- ----------------- -----------------
Hello how are you Hello             Hello how
God bless you     God               God bless
Take care my love Take              Take care        

3 rows selected.

Tags: Database

Similar Questions

  • GREP in parastyle - all the words in tiny paragraph outside the first word

    Hello. I hope for more assistance with the implementation of a GREP in a paragraph style.

    I'm composition several books and the many subtitles (all in the same paragraph style) are written so that each word is capitalized. The editor here now only the first word of each subheading to be capitalized, and instead of working my way through them manually, I was wondering if a GREP could achieve this? I know there are exceptions with proper names, but they are few.

    Any help appreciated, as any quick explanation on each part of the GREP so I understand better how it works!

    If the text was actually indexed using corks, it cannot be changed using GREP, but it may be film script. Script updated Dave Saunders style find/change case script would probably do what you want (change because of the sentence).

  • "BOLD" from the first words of each line?

    I wonder if there is a way to fully automate this. I'm style expandable body of interview-format the text, and I would only the first word of each paragraph, be bold if they are one of the three names. I currently have a nested style black the first word of each paragraph, but not all of the paragraphs in the text begin with a name of interview. Can anyone help?

    Depends on if you need it to happen automatically when you start new documents with interviews, or if you need to do just for a single doc where all your text has already been sent to. If the latter, I had:

    (1) make a duplicate of the nested-style-parastyle called BoldNames

    (2) remove the nested style old style paragraph - now zero paragraphs have the nested style applied, and you have a separate unused paragraph with the nested style in style.

    (3) research the doc with a GREP query:

    To find

    ^(Jake|) Joel | James)

    Implement

    $

    with the format of

    BoldNames

    In this way, only the paragraphs that have one of these names at the beginning of the paragraph will be marked with the paragraph style that owns the nested style that applies "BOLD".

  • GREP: Applies to the first instance only

    Hello

    Another GREP question for you if you can help.

    Situation is applying a character style before specific a Word, i.e. Apply character Style of "four"...

    There are 4 words (lets call them: one, two, three, four) which are a common occurrence and must always appear after the text that should have the style applied character, but my question cultures when one of the four words appear twice or more times in a row and the GREP applies to 2 or more instances of this word , i.e. the character Style applied random text 'a' "'we '"

    I use these greps in the same paragraph style:

    ^. *(?= one)

    ^. *(?= two)

    ^. *(?= three)

    ^. *(?= four)

    I just want the GREP to be applied to the first instance only - hope that this kind of things above is logical?

    Thank you

    This is because GREP is greedy, by default.

    The expression

    ^. * (something more)

    always take as many characters as possible, before processing the "something more": indeed, it will not match what whatsoever until the last occurrence of this text.

    You can specify GREP not greedy match by adding a '?' after the command repeat the code:

    ^.*? (? = \b(one|two|three|four)\b)

    -the question mark can be added to each of the 'repeat-this' codes: +, *, and? (« ! ? ("would mean: ' match'!' zero or one time, but uses the most short as possible match to).

    I condensed your four commands into one list, because it seems that each of them would get matched in turn, leading to problems when you have 'one' and 'two' in the same sentence. With your GREPs, firstly everything up to 'one' would get marked, then all up to "two". Mine uses "whatever first".

    (I've also added "word boundaries" \b before and after, because you wouldn't want to match the "one" in "Mr. Jones".)

  • [JS] [CS3] Apply the character Style to the first word

    I'm a noob that Javascript is concerned, and I expected a little guidance.

    Here is my scenario: I have a book that was composed in a single file; the main content is in a story. I want to select the first word in each block of text on each page and apply a character style. My goal is to use this character style to indicate the page breaks in the XML document - I maps to a specific tag style.

    So far, I have this poor specimen:

    myDocument var = app.activeDocument;
    myPage var = myDocument.pages.item (1);
    var myTextFrame = myPage.textFrames.item (0);


    If (app.activeDocument.stories [0] .paragraphs [0] .words [0]! = null)
    myTextFrame.paragraphs.item (0).words.item (0) = .appliedCharacterStyle
    myDocument.characterStyles.item ('foo');

    I know, I did not implement any kind of loop again (which will be more complicated given that there will be some blank backs, etc.). What I try to do in this is to select the first word in the first paragraph on the second page - which it does in reality. It's the first paragraph of the second begins on the first page, so I select that word on the first page, second page.

    As I said, a lot of work to do but a bit of help on getting to the right word would be most appreciated.

    Well, you were on the right track, but the "myText" test fails if there is no block of text on a page, because it fails a line earlier

    > var myTextFrame = myPage.textFrames.item (0);

    just before that, you must test the number of blocks of text:

    If (myPage.textFrames.length > 0)

    {

    ... your stuff...

    }

    Use it only if you are absolutely positive that there is just a block of text on each page! A slightly better way would be to always loop on each textframe:

    for (frames = 0; frames

    {

    var myTextFrame = myPage.textFrames.item (frames);

    .. etc.
    }

    in this case you don't have test his first length (the loop will not be executed if there is zero text blocks).

    [Grumpy] Since you have only a continuous story, an even better way would be to loop on texts related to this single story executives. You must identify the story somehow, and I usually click on the text cursor in the one that I need:

    monarticle = app.selection [0] .parentStory;

    or you can rely on the fact that the story begins as part of text on page 1:

    monarticle = app.activeDocument.pages [0] .stories [0];

    (I think this should work.) Then, each frame of the story until the end can be found in the table

    myStory.textContainers

    which are usually text blocks. Make a loop on them to help

    for (image = 0; frame)

    {

    myTextFrame = myStory.textContainers [frame];

    .. etc.

    }

  • Capitalize the first word in a sentence

    Hi I was looking for a method/function to capitalize only the first word of a string. (not every word in the string according to the capfirst does very well)

    Thank you

    Oli

    Thank you very much, just work, maye, I would have thought that, no rocket science, doh!

  • Why no iphone 6 and iPad (mini and Air2) capital at the beginning of the first word in the search bar of Safari

    Why no iPhone 6 and iPad (Mini and Air 2) not capitalize first letter of the first word in Safari on the search bar?

    Web addresses contain no capital letters, nor do email. If looking at you any new credit card and it says to activate this card go to www.CardnameService.com/Activate, their meaning is www.cardnameservice.com/activate. It's the same thing.

    The above examples are that of the examples.

  • How can I make Pages capitalize the first word in a sentence?

    How can I make Pages capitalize the first word in a sentence? The I phone t - it, the iPad does, why not not iMac using Pages capitalize the first word on a new sentence?

    Pages of IOS and IOS itself remain different implementations of Pages v5.6.1 for Mac and OS X. In any version of Pages v5, if there was an option to preferences in Pages ' 09, there is no auto-capitalisation function.

    See my previous post is launching an OS X App Store free application, which can be applied to auto-capitalisation to your Pages v5 documents.

  • Receive emails from retailers who have 'click' as the first word.

    Original title: cannot find ' click on ' addresses?

    Lately I have received emails from retailers who have 'click' as the first word, such as click.elowes.com and I always get a 'not found '.  What is the problem?

    Hello

    As you use Windows Live mail, you can also post your request in the Windows Live forums to get help.

  • Header/footer for the first page only

    Hi all

    Is it possible to have headers/footers with option, first page only? The current options are

    • Not first
    • Only in the last
    • Not last
    • Back only
    • In front only

    Is it possible to have 'first only?

    We use Documaker Studio 12.3. Thank you.

    I think that if you want a header, footer on the first page only, which means that you should not use the copy on overflow attribute. Then those who would only be on this first page.

  • How to reference the first word in a text frame (threaded)?

    Hello.

    I have a series of threaded text images.
    I want to be able to reference the first word of each of them.
    [This is no big deal to start the project and do it all on the fly].

    Any ideas how I can get there?

    Any help would be appreciated.

    To get the content of the Word use myWord. content to move the Word use myWord. move (LocationOptions.AT_BEGINNING, myDestinationTextFrame);

  • What is the best way to change the color of the first word in a paragraph?

    I have a lot of paragraphs where I want that the first word to keep the same font, the size, the type - but I want to change just the color of the lettering.

    I suggest to do this:

    (1) change your BC 4567000000 to the following line:

    4,567,000,000 BC - name derived from Hades.

    (2) add the following line after the top of the page:

    . first-word {color: red ;}}

    Note the period in the above code.

    The top of line will now look like this:

    H1 {make-size: 200%; do-family: "Comic Sans MS"; color: #66FFFF; text-align: center ;}}

    H2 {make-size: 100%; do-family: "Comic Sans MS"; color: Red ;}}

    p {make-size: 100%; do-family: "Comic Sans MS"; color: #EEEEEE ;}}

    . First-word {color: red ;}}

    Alternatives are almost similar to this one but try this one and then come back and demand the implementation of alternatives.

  • Capturing the first word of a textbox

    Good, small problem, I can not understand how to get the first word in a text box. Here's the code that captures the full range:

    var LSTN = "LSTN" + xfa.form.OUTSTCHK12.FormPage1.Subform1.PayeeLastName.rawValue; ".

    If someone could help me please, I would be very grateful.

    Well, now you know ho to spread the word, it is just a case of assigning to another field. Assuming that the other field is called OtherField, you would use a command like this:

    OtherField.rawValue = words [0]

    Paul

  • Remove the first word of a line based on delimiter

    Hello

    I have data like this in a column:

    Word1 Word2 mot3

    Word1
    Word1, Word2

    And I want that the select statement to return the row without first word OR keep it what if there isn't a single word in line. As:

    Word2 mot3

    Word1
    Word2

    So I think as we look in the line "returns all the data after, or SPACE ' and ' leave as what if there is only one word" (should be so that there is no empty space after the word).

    Is it possible to do something like this with a select query? What would be a good solution?

    You can do this sort of thing with regular expressions for example

    Select regexp_replace (columnname, ' ^ [^] + (. *) $', '\1') as newvalue

    TableName

    (I hope, that works, I can't test the minute I don't have access to a database)

  • No indent on the first paragraph only after the title

    I am importing a Word document and I encounter a few problems during Assembly.

    1. I don't want the first line of the first paragraph after a heading have a dash. I don't want the Indent on the following paragraphs.

    I created two new styles of paragraphs where firstbodyParagraph style does not have a dash in the 1st row and bodyParagraph style has a dash.

    Title 1A in the following style firstbodyParagraph and firstbodyParagraph a bodyParagraph in the following style. It works very well within Indesign. For example if I score of Heading1 until the next title and select use Heading1, and then click Next. But if I get a Word document where I've adapted Heading1 in word to my own defined inddHeading1 etc, this does not work no matter how I try to change the linking of the Word text in firstbodyParagraph or bodyParagraph. Following style is not honoured so to speak.

    2. Another problem is that my margin to the left and right margins settings change not is. Word document left only right margin and my body text paragraphs are to the left and right margins straight. A small sign appears on my paragraph style and I have to go through the whole of the document paragraph by paragraph to click away.

    To the text block, you can break the flow of the text on the first image, substitute the paragraph and style of object of the framework and then create a link to the stream. If a stream of text associated with various substitutes:

    Click on the first image port, followed by a click in the first frame to untie the lead

    All select and clear the replacements for the paragraphs of the text styles and select the image and erase his substitution. Italic Blue Note not style loses her style because she has no style applied character:

    Renfilez:

Maybe you are looking for