Getting substring out of column using substring and /or instring function

I need to strip out only JR and Sr out of the last name column. But for the last name " Mcfadden Iii" leave as is.
last_name
Mcfadden Iii
Williams
Graham
Chandler
La Munion
Cook
Hall
Hall
Davidson
Williams
Williams Jr
Bell
Goodwin
Rivera
Mclendon Sr
Mclendon
Robinson
Vines
Campbell
Pyne
Myers
Williams
Moody Williams
Edited by: user581807 on Mar 12, 2009 6:03 AM

Hi,
REGEXP_REPLACE ( last_name
               , ' ((jr)|(sr))$'
               , NULL
               , 1
               , 1
               , 'i'
               )will do that, regardless of whether 'jr' or 'sr' is capitalized or not.
If you prefer a case-sensitive expression, omit the last argument. (Actually, you could omit the last four arguments ", NULL, 1, 1, 'i'").

Similar Messages

  • Need to convert music videos that are tagged as "Movies" and re-rag them as "Music Videos" to get them out of my movies library and into the Music Video folder. Likewise, I ha e some educational videos that belong in "Podcasts." Help?

    Need to convert music videos that are tagged as "Movies" and re-rag them as "Music Videos" to get them out of my movies library and into the Music Video folder. Likewise, I have some educational videos that belong in "Podcasts." Help?

    Select/highlight the ones that you want to change in your iTunes library, do Get-Info (control-I) and change their Media Kind on their Options tab to 'Music Video' - and then similarly for the podcasts.

  • HT4191 I have Notes that transferred to email when I set up a new email acct. They no longer appear in Notes. I can only access them in the email acct. How do I get them out of the email acct and back to the Notes app?

    I have Notes that transferred to an Email acct when I set up the acct. The Notes no longer appear in the Notes app only in the Email acct. How do I get them out of the Email acct and back to Notes? I stopped at an Apple store and they told me to copy them from the email back to Notes. But when I was in the email acct, I could not find a way to copy them. Shouldn't Notes remain in Notes unless I specifically send them somewhere else?

    Go into Settings > Mail, Contacts, Calendars, select that email account on the right-hand side of the screen and turn Notes 'on' for it - they should then appear in the Notes app instead of as an email folder in the Mail app (they will still be linked to that email account, so you may need to tap the 'Accounts' button at at the top left of the list of notes)

  • I have a disk in my mac and came not get it out?  I use the command E key to eject but it does note come out?

    I have a disk in my mac but it does note come out useing command e to eject? how do i get it out or do I have to get it jixed?

    Force eject a stuck cd/dvd
    First try the normal methods to remove the disc. Drag its icon to the Trash can in the Dock or select 'Eject' from the File menu.
    If you are running a virtual machine, e.g. VMFusion, ensure that the CD is disconnected from the virtual machine. This will sometimes allow the CD to now show up in Mac OS X.
    Shut down the computer and start up whilst holding down the mouse button. This may take some time, but keep your finger on the mouse button right up until the disc comes out or the log-in screen has appeared.
    If you have Toast Titanium installed on your computer, choose EJECT DISC from the menubar.
    Sometimes you can successfully use the eject disc button in iTunes even if the disc is not visible to the Finder
    Open Disc utility and choose the disc you wish to eject in the left-hand pane, then click on the Eject button.
    Some Macintoshes have a paperclip hole that you can insert a straightened paperclip into, manually triggering the eject mechanism.
    Open Terminal and type "drutil tray eject" to eject the disc/tray, and "drutil tray close" to close the tray.
    If your computer has an eject button on the keyboard, restart the computer holding down the Option key. When the startup disk selection screen appears, let go of the option key and press the keyboard's eject button.
    Source: http://guides.macrumors.com/Force_Eject_a_Stuck_CD_or_DVD

  • Sound randomly comes out speakers when using earphones and wierd ZZZZZT sound

    For some wierd reasonm, sound sometimes comes out my speakers when I have my earphones in for like a split second. Also sometimes this wierd ZZZZZT sound comes out when listening to music and scares the living crap outa me.Help please?

    I don't get the weird sound (yet), but the sound will randomly stop coming through the headphones and play through the speakers. This is incredibly frustrating, as I just bought this laptop this month and recieved it yesterday.
    Please, someone help us fix this.

  • I cannot get on my email exchange using firefox, and it has been working until today.

    My company uses a owa.postoffice.net exchange, and we are supposed to use internet explorer, or firefox. I have a Mac, so I use firefox, and it has been working fine for the past 90 days, and today, I go to the exchange, type in my password and user name, and I am then sent to just a blank page. I talked to two other Mac user's today within my company and he is not having any trouble at all, so that tells me that is my firefox that is having these problems. I would like someone to call me about this @ 919-669-4909. I do not want to talk over email.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Firefox > Preferences > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox > Preferences > Privacy > Cookies: "Show Cookies"
    *https://support.mozilla.org/kb/Cannot+log+in+to+websites

  • How do I use sqrt() and pow() math functions?

    I tried starting with import java.lang.Math.*; and using sqrt() and pow(), but I get an error response in compilation.
    //** 1/pi calculation program using Ramanujan's forumula **//
    //** by n=2 iteration, double precision value for 1/pi repeats **//
    import java.lang.Math.*;
    import java.io.*;
    public class CalcInversePiRamanujan {
      public static void main(String args[]) {
        double n=0, term, four_n_factorial=1, n_factorial=1, inverse_pi=0;
        inverse_pi = four_n_factorial * 1103 * 2 * sqrt(2) / 9801; //** initial value for n=0 **//
        System.out.println(inverse_pi);
        for (n=1, four_n_factorial=1, n_factorial=1; n<=3; n++) {
            four_n_factorial *= (4 * n);
            four_n_factorial *= (4*n-1);
            four_n_factorial *= (4*n-2);
            four_n_factorial *= (4*n-3);
            term = four_n_factorial;
            n_factorial *= n;
            term /= pow(n_factorial, 4);
            term *= 1103 + 26390 * n;
            term /= pow(396, 4 * n);
            term *= 2 * sqrt(2);
            term /= 9801;
            inverse_pi += term;
            System.out.println(n, term, inverse_pi);
        System.exit(0);
    }

    all methods in math class are static so you have to call them as
    Math.pow() and Math.sqrt() you dont have to import any additional packages as Math is a class available in java.lang package
    you have to change your
    System.out.println(n, term, inverse_pi); to
    System.out.println(n+ term+ inverse_pi);
    math class also provides the value of Pi you can access it using Math.PI

  • How can I get my Apple Remote to play/pause and do other functions on all applications?

    When I press the F8 button on my Macbook, it plays or pauses the media for whatever media application I have open, whether that's iTunes, VLC, or MPlayerX. Same goes for F7 and F9, which are backwards and forewards respectively.
    Well I recently bought an Apple Remote and expected that the same thing would go for the remote; the play/pause button would give the same command as the F8 button, so I could use the remote on whatever application that also supported the F7, F8, and F9 buttons. But apparently, that's not the case; so far I've only been able to control iTunes.
    So is there any setting I can change or program I need to install to have the Apple Remote buttons work just like the keyboard media buttons? I tried Remote Buddy, but that's not giving me specifically what I want since it's only designed to make specific programs compatible. But they still don't support for example MPlayerX, which is my default video player.

    Gosh, that must explain why it didn't come with a magic hat!
    I completely accept the fact that Apple designed it to do a limited set of functions, but in the post I asked if there was any program that I can install that causes it to do hit the function keys for me. There's already Remote Buddy, which intercepts remote signals and performs specific functions instead of the normal ones. How then can there not be a program that also intercepts them, but hits the function keys? Seems to me that that would be even easier than what Remote Buddy's doing.

  • HT4686 How can I publish my website developed using iWeb and have all functions of the blog page work as it did with MobileMe?

    I have developed a website using iWeb and it includes a blog page selected from stock pages in iWeb.  I'm publishing it with GoDaddy and when I do that the interactive functions of the blog page don't work. (Adding comments and photos as well as searching).  Is there any simple way to host this site somewhere so that those functions work?

    No, because all those functions were MobileMe only and now that MobileMe has gone, they won't function any longer.
    To enable these to function, you either need to add them yourself or change your blogging platform to something else such as WordPress etc., and create a link from iWeb to your WordPress blog or embed the blog page using iframe into your iWeb site.
    Commenting systems such as Disqus or http://www.intensedebate.com work quite well.

  • Error while using CURRENTMEMBER property in INSTR function

    Hi,
    I am looking for SQL 'LIKE' operator equivalent solution in MDX and I tried the below query.
    SELECT FILTER([Company].Members, INSTR([Company].CURRENTMEMBER.NAME,"AA") >0) on columns from temp1.db
    The above query is not compiling due to CURRENTMEMBER propery in INSTR function.
    When I replaced [Company].CURRENTMEMBER.NAME with a constant "AABB", then the query is working fine.
    SELECT FILTER([Company].Members, INSTR("AABB","AA") >=0) on columns from temp1.db
    Also, CURRENTMEMBER is working fine outside INSTR function.
    SELECT FILTER([Company].Members, [Company].CURRENTMEMBER.[GEN_NUMBER] = 1) DIMENSION PROPERTIES GEN_NUMBER on columns from temp1.db
    Is CURRENTMEMBER property not supported in INSTR? I am using Hyperion Provider Services 9.3.1.
    Is there any other solution for SQL 'LIKE' operator equivalent in MDX?
    Thanks in advance,
    Anil.

    With Essbase 9.3.1 it ought to work. The following is a simple query that works for me:
    select
      filter (
           [Market].Members,
           Instr (1,
                [Market].CurrentMember.MEMBER_NAME,
                "e"
           ) > 0
      ) on axis(0)
      from [Sample.Basic]
      ;

  • How to get folders from your server using IMAP and push, 3G.

    After looking all over this forum looking for an answer, I found out on my own. here's how:
    Step 1: Login to your email server.
    - If you can, log into your email server via webmail. This ensures that you are in fact connected to your email server and your folders are being created. If your email server doesn't have webmail, then create the folders using whatever email app you have on your PC or Mac.
    Step 2: Creating the folders.
    - All the folders you want to have show up on your iphone must be created as sub-folders under your Inbox folder on the server. Here's what mine looks like for example.
    Mailbox
    -Inbox
    ++-Sent Messages
    ++-Deleted Messages
    ++-Friends
    ++-Work
    ++-Others
    -Drafts
    -Sent
    -Deleted
    -Junk Email
    *you may be wondering why I have 2 sent and Deleted folders. I have it set up so that the folders in the inbox are for the iphone, and the ones outside are from Outlook.
    Step 3: Getting the folders to show up on the iphone.
    - Once you set up your IMAP account on the iphone 3g, simply log into the account, wait for it to finish checking for emails, then tap the Inbox button. Give it a few seconds to load if it's loading something. After it finishes, back out by tapping the 'Mailboxes' in the top-left corner, and your folders should be there.

    So you'd use Java to send the WebDAV protocol. Since this is a Java forum, it would help if you provided the WebDAV part of the equation and we can help with the Java part. Okay? Let us know when you have the WebDAV information.

  • When i buy a song, i no longer get "similar" suggestions. I used to, and now don't. I liked that feature, how do i get it back on?

    When I buy a song, I no longer ger similar suggestions.  I used to, but no longer do.  I liked that feature how can i get it back?

    Hi!  It was a library book and I first downloaded it to my computer, then tranferred it to my Ipod via USB cable.
    It appears on my Ipod menu under Music - Audiobooks and also under Playlists where the book title appears with 10 songs under the name.
    However, it does not show up at all on my computer screen under my Library music listings either on the left side where the playlists are listed or on the right where the individual songs and artists, etc. are listed.
    At this point my setting is on manaully manage music.  If I change that now in order to download and buy a song, my book will get deleted from the Ipod.

  • How to handle audit columns using EJB and JPA.

    Hi,
    I am using JDev10.1.3.3 with Swing and EJB + JPA + TopLink.
    Every entity (POJO) has the same audit columns:
    @Column(name="CREATE_DATE", nullable = false)
    private Timestamp createDate;
    @Column(name="CREATE_USER_ID", nullable = false, length = 30 )
    private String createUserId;
    @Column(name="MODIFY_DATE", nullable = false)
    private Timestamp modifyDate;
    @Column(name="MODIFY_USER_ID", nullable = false, length = 30 )
    private String modifyUserId;
    Does JPA has a default feature/component that will auto populate this fields. (Similar to Business Components)?
    Thanks,
    Jim

    Hi,
    I am not aware of this being part of EJB/JPA. However, you may want to check here. Its the TopLink forum, but these guys are involved in the JPA standardization
    TopLink/JPA
    Frank

  • Using 'OR' between column using 'NEAR' and 'ACCUM'

    I am newbie to the Oracle Full text searching. After going thru documentation and forum posting in here now I am able to create so Oracle Full Text index on table and was able to write some queries as well. While implementing the findings in my research I had to question about the different of the queries listed below.
    Please some one could look at this post and let me know if this correct or not.
    CREATE TABLE tbl_application (
    app_id VARCHAR(80),
    app_title VARCHAR(80),
    app_desc VARCHAR(120),
    last_update_user VARCHAR(10)
    begin
         CTX_DDL.CREATE_PREFERENCE ('tbl_datastore', 'MULTI_COLUMN_DATASTORE');
         CTX_DDL.SET_ATTRIBUTE ('tbl_datastore', 'COLUMNS', 'app_id, app_title, app_desc');
         ctx_ddl.create_section_group ('tbl_section_group' , 'basic_section_group' );
         ctx_ddl.add_field_section ('tbl_section_group' , 'app_id', 'app_id');
         ctx_ddl.add_field_section ('tbl_section_group' , 'app_title', 'app_title');
         ctx_ddl.add_field_section ('tbl_section_group' , 'app_desc', 'app_desc');     
    end;
    create index tbl_index on tbl_application (last_update_user) indextype is ctxsys.context parameters ('datastore tbl_datastore section group tbl_section_group SYNC (ON COMMIT)' );
    so after creating the above mentioned table and the index, I have the following two version of the queries. When I compared the performance between these two queries is more or less same thing. Do you see any other issues using one over other version of these queries.
    SELECT app_id, app_title, app_desc,
    SCORE (1) AS weighted_score
    FROM tbl_application
    WHERE
    CONTAINS (last_update_user, '
    (((knowledge NEAR contains) WITHIN app_id) OR ((knowledge ACCUM contains) WITHIN app_id)) * 10 OR
    (((knowledge NEAR contains) WITHIN app_title) OR ((knowledge ACCUM contains) WITHIN app_title)) * 5 OR
    (((KNOWLEDGE NEAR contains) WITHIN app_desc) OR ((knowledge ACCUM contains) WITHIN app_desc))', 1) > 0
    ORDER BY SCORE (1) DESC;
    SELECT app_id, app_title, app_desc,
    SCORE (1) AS weighted_score
    FROM tbl_application
    WHERE
    CONTAINS (last_update_user, '
    (((knowledge NEAR contains) OR (knowledge ACCUM contains)) WITHIN app_id) * 10 OR
    (((knowledge NEAR contains) OR (knowledge ACCUM contains)) WITHIN app_title) * 5 OR
    (((KNOWLEDGE NEAR contains) OR (knowledge ACCUM contains)) WITHIN app_desc)', 1) > 0
    ORDER BY SCORE (1) DESC;
    Thanks
    Rakesh

    Use OR function in DAX :
    =CALCULATE(COUNTROWS(Employees),FILTER(Employees,OR(ISBLANK(Employees[Last Date]),Employees[Last Date]>DATEVALUE("2014-01-01"))))
    which is equal to
    =CALCULATE(COUNTROWS(Employees),FILTER(Employees,ISBLANK(Employees[Last Date])||Employees[Last Date]>DATEVALUE("2014-01-01")))

  • I keep getting cut out of my e-mails, and I cannot get any yahoo toolbars in my e-mail window

    I can be in my e-mail window, and it will just cut me off.
    Plus I use to have Yahoo toolbar above all my e-mails so i could copy and past or print an e-mail. Those are now completely gone, and I don't know how to get them back.

    I solved my problem. I switched from Yahoo to Google as my home page.
    I went to the Google Website, and clicked on the '''Google logo''' and drug it on top of the little house in the toolbar screen. Then I clicked '''yes''' to accept Google as my home page. I had to then restart my computer.
    Now, when I clicked Firefox to open my Internet connection, their screen popped up with the Google logo on it. I ignored that, and clicked the '''envelope icon''' and went straight into my e-mails. I now have all my Toolbars back on my e-mail screen. In short, I eliminated Yahoo as my home page, and switched to Google.

Maybe you are looking for

  • How to get the selected rows in a table

    Hi, How to get the ids of all the selected rows. On Page load a query is executed that shows the data in a table with a checkbox in the first column to select the rows and delete. Now if a user select multiple rows how do I get the ids of selected ro

  • Sorry, something went wrong. Please try again.

    Hi.I had 32 bits and i changed to 64 bits and now i cant connect to skype. I have a Microsoft account and i cant connect even with Facebook. It says Sorry, something went wrong. Please try again. Please helpP.S: I dont have .net framework. Is it beca

  • Sendmail/postfix doesn't always deliver emails

    Hi, I'm running 10.3.5 and have some processes there that send emails via sendmail when they need to (build notification emails). I am not customizing the sendmail/postfix configuration at all. Most of the time things work great but once in a while t

  • Doubt Regarding Collapse/Restore In Page Properties

    Hello, I created a page and added a html portlet, checked the option Show Collapse/Restore Link on Portlet Headers under the region properties. In the page where the portlet is added, the Collapse/Restore works perfectly. When I added the portlet in

  • Goldengate replicate physical standby database

    Friends, I did not get a answer in data guard place Could we use oracle golden gate  to replicate a data guard  physical standby database into a  new logical database? Or we must replicate data guard primary database into a new logical database? Than