substr and instr - get all the characters after the last.

I have a few fields tbl as follows

ABC, 123, xyz, 234

123, ggg, ppp, rrr

SSS/bbb/444/a

BB/11

XX/bb/f

I want to choose any characters after the last.

so the above might give

234

RRR

one

11

f

played with substr and instr but have not been able to figure it out yet. He should get one after last chain / no matter where / is or how they are.

Here is an example

Select

substr ("123/dd/gg ', instr (substr (" 123/dd/gg ', instr ("123/dd/gg ', ' /'") + 1 "), ' / ') + 3")

of the double

substr ("123/dd/gg ', instr('123/dd/gg','/',-1,1) + 1")

Tags: Database

Similar Questions

  • My screen on my laptop is amplified and can not get all the info on the screen... How to make all this fit?

    My screen seems to be enlarged and cannot get all the info on the screen... How to make all this fit?

    Go to the website of the manufacturer of your laptop > drivers and downloads Section > key in your model number > look for the latest Vista drivers > download/install them.

    http://Windows.Microsoft.com/en-AU/Windows-Vista/change-screen-resolution

    Change the screen resolution

    Screen resolution refers to the clarity of the text and images on your screen. At higher resolutions, items appear sharper. They appear also smaller, so more items adapted to the screen. At lower resolutions, fewer items adapted to the screen, but they are larger and easier to see. At very low resolutions, however, images may have serrated edges.

    See you soon,.

    Mick Murphy - Microsoft partner

  • Get all the text values in a XML node

    Suppose I have a XMLList that I'm working my way through and I want to quickly and easily get all the 'text' from the node. In other work strip the < xmtag > all possible markup and attributes and just leave the content.

    There is a simple/fast way to do it?

    < myNode >

    < title > title an event here < /title >

    < host > name and title of the presenter here < / presenter >

    < date startTime = "Somedate" / >

    < desc > <! [CDATA [text here. [[It < b > would < /b > have html or links or something like.]] > < / desc >

    < resources >

    list of < resources > has some resources, downloads, etc. < / res >

    < resources > another site or something like < / res >

    < / resource >

    < / myNode >

    If the xml is your XML instance, after loading is finished:

    trace (XML.descedants("*"). Text());

  • How to use substr and instr, where the line of input Multi text

    Hi all

    with

    data in the form of)

    Select ' Mary America.1234 Southridge Park Dr... Samna Lorie.MO.31234..' double val

    Union of all the

    Select 'Bill Johnson.Apartment 3 b. Sterling.VA.20166.3 Plaza Falke' of the double

    )

    Select

    regexp_substr (shipping_instructions, "[^ #] +' 1, 1") name

    , regexp_substr (shipping_instructions, "[^ #] +' 1, 2") address

    , regexp_substr (shipping_instructions, "[^ #] +' 1, 3") city

    , regexp_substr (shipping_instructions, "[^ #] +' 1, 4") State

    , regexp_substr (shipping_instructions, "[^ #] +' 1, 5") zip

    , regexp_substr (shipping_instructions, "[^ #] +' 1, 6") County

    FROM (select REGEXP_REPLACE (val, ' \.)) () [^.])', ' #\1 ") data shipping_instructions)

    (1)'Mary America.1234 Southridge Park Dr... Samna Lorie.MO.31234..'

    (2)'Bill Johnson.Apartment 3 b. Sterling.VA.20166.3 Falke Plaza. »

    "Mary America. 1234 Southridge Park Dr. Samna Lorie. MO.31234..'

    NAME ADDRESS CITY ZIP County SATE

    ---------                  --------                                ------------           ------           -------    -- -----

    Married America 1234 Southridge Park Dr.    Samna Lorie MO 31234  NULL VALUE

    "Bill Johnson. Apartment 3B. Sterling. VA. 20166. Falke Plaza 3... "

    NAME ADDRESS CITY ZIP County SATE

    ----------------      -----------------        -------       -----        ---         --------

    Bill Johnson apartment 3B Sterling, WILL 20166 3 Falke Plaza.

    Problem

    ---------

    (1) if the value, if the County (if null) value then it shows the ZIP with dot's (.) value, in the 31234 above..,.

    How to solve this problem?

    (2) another possible to fix the code, I want to use substr and InStr.

    (3) who is the best approach?

    Conditions:

    --------------

    (1) shipping_instructions column has the value with "Mary America.1234 Southridge Park Dr... Samna Lorie.MO.31234... »

    This means it combined all the similar name, address, city, State, zip

    (2) we insreted in the table separately.

    =========================

    / * Use Substr and Instr * /.

    =========================

    I used substr and instr, but I'm getting the money results (no point in the address).

    "America Mary. 1234 Southridge Park Dr. Samna Lorie.MO.31234..'


    NAME ADDRESS CITY ZIP County SATE

    ---------                  --------                                ------------           ------           -------    -- -----

    Mary America 1234 Southridge Park Dr. Samna Lorie MO 31234  NULL VALUE

    But I need the results (no point in the address)

    NAME ADDRESS CITY ZIP County SATE

    ---------                  --------                                ------------           ------           -------    -- -----

    Mary America 1234 Southridge Park Dr.    Samna Lorie MO 31234  NULL VALUE

    Hello

    994122 wrote:

    Hello

    (1) how do to do this, use the substr and instr functions?

    Thank you

    You can't do all the work with SUBSTR and INSTR; you need regular expressions to obtain a string delimited by a #.

    Once you have such a string, then you can use SUBSTR and INSTR (instead of REGEXP_SUBSTR) to get the separate secondary strings:

    WITH got_delimited_string AS

    (

    SELECT REGEXP_REPLACE (val

    , '\. ([^ .]| $)'

    , '#\1'

    ) AS delimited_string

    FROM the data

    )

    got_pos AS

    (

    SELECT delimited_string

    , INSTR (delimited_string, "#", 1, 1) AS pos_1

    , INSTR (delimited_string, "#", 1, 2), pos_2

    , INSTR (delimited_string, "#", 1, 3) AS pos_3

    , INSTR (delimited_string, "#", 1, 4) AS pos_4

    , INSTR (delimited_string, "#", 1, 5) AS pos_5

    , INSTR (delimited_string, "#", 1, 6) AS pos_6

    OF got_delimited_string

    )

    SELECT SUBSTR (delimited_string, 1, pos_1 - 1) AS the name

    SUBSTR (delimited_string, pos_1 + 1, pos_2 - (pos_1 + 1)) AS address

    SUBSTR (delimited_string, pos_2 + 1, pos_3 - (pos_2 + 1)) AS city

    SUBSTR (delimited_string, pos_3 + 1, pos_4 - (pos_3 + 1)) AS State

    REPLACE (SUBSTR (delimited_string, pos_4 + 1, pos_5 - (pos_4 + 1))

    , '.'

    )                                                           AS zip

    SUBSTR (delimited_string, pos_5 + 1, pos_6 - (pos_5 + 1)) AS the County

    OF got_pos

    ORDER BY delimited_string

    ;

  • Satellite L500 - can I get all the instruments and the driver for Win 7?

    good then I got this Toshiba Satellite L500 with Intel... its installed with Windows Vista Home Premium...

    The first problem I had with it was that the Toshiba programms stoped working and reformatting the drive and put it back, then I 'solved' this part...

    Now, the second is that RUNDLL32.exe stops working after that the pc started motor pump and the computer stops responding or becomes slow...
    I tried to format the drive but is still of problems.... more the toshiba programms are defective...

    After research I did his seems to have a place of Vista so I asked of upgrade me to windows 7 and then I also had a few questions?:  :|

    1. is it possible to get all the programms Toshiba Windows 7, flash cars, webcam etc.

    2 does windows 7 run all the programms vista only?

    3 - is so great that I heard?

    Thank you! {for your help, I really need some help... thank you: 8}

    Hello

    I put t know why you have software problem with the Vista OS preinstalled but my Toshiba tools and utilities work fine! Once the control buttons stopped working, but I could fix it reinstall the VAP.

    Back to your question:
    Yes, you can get all the Win 7 drivers and tools for the L500 series. Why not?
    If you would take a glance on the Toshiba page you would find all the stuff for download!

  • How to get all the icons on the desktop after installing xp

    After installation of xp only recycle bin makes its appearance. How to get all the other program on the desktop icons?

    Like internet explorer, my computer...

    Hello

    How to create a shortcut on the desktop?

    If the item is located in the start menu:

    1. click on start. The start menu appears.

    2 find the item that you want to create a shortcut. If the element is in a submenu of the menu, go to the submenu.

    3 right click on the element. A context menu is displayed.

    4. click on send to. A submenu appears.

    5. click on desktop (create shortcut). XP creates a shortcut to the item.

    _____________________________________________________________________________

    Here is the vista forums

    Try the xp forums at the below link for any other question of XP

    http://answers.Microsoft.com/en-us/Windows/default.aspx#tab=4

    Answers by topic

  • My boss asked me to creative cloud. I had to get all the Adobe programs. Before I installed the creative cloud, I installed the test version of Photoshop, Indesign and Illustrator. The test version ran outside and npw it says I have to buy

    My boss asked me to creative cloud. I had to get all the Adobe programs. Before I installed the creative cloud, I installed the test version of Photoshop, Indesign and Illustrator. The test version was missing and npw it says I have to buy the programs that we already have?

    Please see the links below.

    Also, make sure you use the right adobe ID to log in.

    Hope this will help you.

    Kind regards

    Hervé Khare

  • my keyboard has sometimes unresponsive, despite verified the above. Then it works again after I have shut down and restart my mac. is this normal? If this isn't the case, that due to an application? for example, I installed photoshop and use it all the ti

    Jin

    Sometimes, my keyboard stops responding, despite the checkist troubleshooting.

    Then it works again after I have shut down and restart my mac!

    is this normal? If this isn't the case, that due to an application? for example, I installed photoshop and use it all the time... also openoffice document prog...

    What else could be?

    I just replace the keyboard with a new one, but the problem persists.

    my mac has also been in mac repair and they found nothing wrong.

    Thank you!

    Please run and view a report of EtreCheck http://etrecheck.com/

  • I use 5s iPhone and upgrade to iOS 9.3.1 but he can't get all the features...

    I use 5s iPhone and upgrade to iOS 9.3.1 but he can't get all the features...

    What features Miss do you?

  • My new system see the the old system in the network, but I can't get the passwords to work and I tried all the. Now what?

    ESTABLISHING A NETWORK.

    My new system see the the old system in the network, but I can't get the passwords to work and I tried all the. Now what?

    Hello

    1. don't you make changes on the computer before the show?
    2. what version of operating system you are using on the computer?
    3. which network you're talking about (home wireless network or group)?
    4. which steps have tried?


    If you use a group home on the computer, see the link for more information.
    Home Sweet homegroup
    http://Windows.Microsoft.com/en-us/Windows7/help/home-sweet-HomeGroup-networking-the-easy-way

    You can also check out the link.
    Microsoft's strategy concerning lost or forgotten passwords
    http://support.Microsoft.com/kb/189126

     
    Provide us more information for you to help.
  • I can't get all the connections. HP Pavilion laptop g6 was working fine and then just stopped to say the connections of the error.

    I can't get all the connections. HP Pavilion laptop g6 was working fine and then just stopped to say the connections of the error. I tried everything I could but to no avail.

    Hi Sheryl,

    more information is needed for a better response from the community.

    Here's a generic convenience store to try:

    http://Windows.Microsoft.com/en-us/Windows/help/wired-and-wireless-network-connection-problems-in-Windows

    B Eddie

  • I have the HP envy window8 and monitor AOC 22 "Led. I can't get all the colors to be displayed.

    Original title: color monitor

    I have the HP envy window8 and monitor AOC 22 "Led.  I can't get all the colors on the screen. The colors are bright that I receive, but can't get the yellow, green, purple. etc. I followed in the Help menu for calibration of the colors without success by the buttons on the monitor in windows.

    Hi Ellen,.

    (a) you use HP ENVY laptop or desktop computer?

    (b) what is the model number for HP ENVY and monitor AOC?

    (c) what kind of connector do you use to connect the monitor?

    (d) have you tried to use the other cable and check if works?

    You may experience this problem if the connections between your computer and your monitor is loose or if the drivers of graphics cards is corrupted. Try these methods and check if that helps:

    Method 1: I suggest you to update the latest drivers for the graphics card for Windows 8 and check if it helps:

    http://WWW8.HP.com/in/en/support-search.HTML?tab=1#/qryterm=HP%20envy&SearchType=s-002

    Method 2: Visit the COA Web site and install the latest drivers by selecting the drivers of the AOC monitor for your model and see if it helps:

    http://www.aocindia.com/service_manual_monitor.php

    See the documentation for your monitor and see if you can find the menu to restore default settings. If the problem persists I suggest you to contact the manufacturer (AOC) for assistance.

    Also refer to this article: get the best display on your monitor

    http://Windows.Microsoft.com/en-in/Windows-8/get-best-display-monitor

    Hope this helps, if you need help on Windows let us know we will be happy to help you.

  • I created signatures and look OK in preferences, but I can't use them.  It worked once, but I don't know how or why.  I don't get all the dialog boxes.

    I created signatures and look OK in preferences, but I can't use them.  It worked once, but I don't know how or why.  I don't get all the dialog boxes.

    Thank you.  I read the article you quoted, as well as others, several

    times.  Creation has been problem free.

    My problem is that AID has never said, that I could find, HELP or

    TIP to search for a tool called certificates.  I searched,

    Signatures, Signatures Digital and many others but they lead no where.

    I think that HELP need HELP.

  • Using a Mac OSX updated 10.9.5, to update to the latest update of Lightroom, now get error - Lightroom met permission issues. Click on fix - cannot fix. You click on read more and I tried all the solutions. Always error. Uninstalled and reinstalled - alwa

    Using a Mac OSX updated 10.9.5, to update to the latest update of Lightroom, now get error - Lightroom met permission issues. Click on fix - cannot fix. You click on read more and I tried all the solutions. Always error. Uninstalled and reinstalled - always error.  Cannot set up a new admin on Gov't computer user. Help

    Please make sure that you gave permission for the folders listed in the article, follow these steps.

    1 - give read and write permissions for the Application Support folder and preferably on User Library and the secret library.

    2 - Add user and admin both permissions.

    When you open the Get Info option for specific folder.

    Make sure you click on '+' symbol, it will open the list of user accounts. Add currently logged in user account and Director of user account, if it is not added.

    Both must have read and write to prevent access these some questions in the future.

    Important:

    Once you added as currently logged on user account and administrator user accounts and provided access for reading and writing.

    Make sure you click on the gear icon and select apply to closed.

    Lock dialog box and close the Get Info .

    So that all the folders in the folder Adobe will get read and write access.

    Let us know if this helps

    ~ Assani

  • Get all the layers and apply to other documents

    Hello everyone,

    I'm copying all layers from one document to the other. But just copy paste is not enough for several reasons (root document may already be closed, copy at a time when the new document is not open yet,...).

    This means that I have to remember all the layers and use them later.

    At the moment I am sth. Like this:

    ---------------------------------------------------------------------------------------

    public static std::vector < PIActionDescriptor > layeractions;

    Sub testGet()

    {

    Result PIActionDescriptor = NULL;

    numLayers Int32;

    SPErr error = kSPNoError;

    DescriptorTypeID typeID = 0;

    Int32 docCounter = 1;

    error = PIUGetInfoByIndex (docCounter,

    classDocument,

    keyNumberOfLayers,

    & numLayers,

    (NULL);

    If (numLayers > 0)

    for (int32 layCounter = 1;

    layCounter < = numLayers & & error == kSPNoError;

    layCounter ++)

    {

    error = PIUGetInfoByIndexIndex (layCounter,

    docCounter,

    classLayer,

    classDocument,

    0,

    and result,

    (NULL);

    layeractions.push_back (result);

    }

    }

    Sub testSet()

    {

    SPErr error = kSPNoError;

    Result PIActionDescriptor = NULL;

    for (auto & it: layeractions)

    {

    error = sPSActionControl-> Play (& result, eventMake, he, NULL);

    }

    }

    ---------------------------------------------------------------------------------------

    So what I'm doing, open a doc with some layers. Then testGet(), open new document then testSet().

    But bench always puts "the command 'Make' is not currently available." and error = - 128.

    Hope you get what I'm trying.

    Thanks for any thoughts!

    Who's going to be a difficult path to travel to this topic. Even if you can get all the properties of the active document and the layers within the document, you have not dealt with pixels on a normal layer data. You will need to save this broad as well. And for dynamic objects and linked smart objects... you have a job to do. Any topic of a document is not capable 'get '.

    Trying to cope with this: "document might already be narrow" would be almost impossible IMO.

    Remember, the source document, which is now closed I now want to copy. Then you can do:

    1. open closed source document. (Or make it more if it is already open)

    2. for each layer in the source document

    a. Select the layer

    b. copy of the document target

    3. close source document.

    The Get accessor routines are not for 'read' directly. You must get the interesting bits of information on and then use the game code that you found using listener.

Maybe you are looking for

  • Cracked screen

    Hello guys! I use a 6 s iPhone for almost a year. Recently my cousin threw to the ground violently. I picked up and saw that the screen was cracked badly. There was a hole in the side at the bottom right, I could easily see the material of the speake

  • Restore the data in the external drive using Time Machine

    Hi y ' All! I store my photos in my external hard drive because there is not enough space in memory is internal. This is actually my second drive external hard than my first (Adata HE720) is not the beginning of last year. Unfortunately, my WD Elemen

  • Sound / Audio (CRAC, pop, broken playback) the buffer Y460P issues

    Hello I have problems playing audio without clicks and pops. They sound like problems of buffer against the recess. Clicks occur during audio playback of any program, but worsen under certain cercumstances. The worst time is when I have my external m

  • BlackBerry Smartphones Google sync on the blink?

    Hello I just deleted google sync app to my BB and took the advice of RIM here to allow syncing of my BB calendar with my google calendar - http://btsc.webapps.blackberry.com/btsc/viewdocument.do?noCount=true&externalId=KB24204&sliceId=2&cm... However

  • When you ask the ORA-24247 utl_http package: access denied by access control (ACL) of network list

    Dear all,Need your help please.Do in the face of ora 24247 network denial of access (ACL) even after following the procedure below. It was working fine until today where I did just drop and recreate again.BANNEROracle Database 11 g Enterprise Edition