Select before the last character.

I have some URLS in a picture like this

http://test.com/ABC/ghgh.html

http://test.com/BCD/

http://test.com/FFF/default.aspx

http:// test2.com/a

I want to select all the items before the last.

But if the last / is it after the .com can get just how it is.

so before should translate into

http://test.com/ABC

http://test.com/BCD

http://test.com/FFF

http:// test2.com/a

create table soqs2)

URL varchar2 (50)

);

insert into soqs2 values ('http://test.com/abc/ghgh.html');

insert into soqs2 values ('http://test.com/bcd/');

insert into soqs2 values ('http://test.com/fff/default.aspx');

insert into soqs2 values ('http:// test2.com/a "");

SQL and PL/SQL are the same forum...

Check my last response to your original thread select prior to last character /

Tags: Database

Similar Questions

  • Select the last character of a string

    Hello
    I want to select the last character of a string address. "For example, as a result of select ' 165 John Ave W '-'W '. I tried to use the RIGHT but it does not work. I am using sqlplus.

    SELECT RIGHT(ADDRESS,1) FROM addresses;
    ORA-00904: "RIGHT": invalid identifier

    I can't find that any select statement to get the result I want. Ideas?

    Thank you!

    You want: SUBSTR (, - 1).

  • Select from the table where the last character of the string is numeric

    Hello
    I have a table of STREETS with a field called ADDRESS. I want to select all the records in streets where the last character in the address is a number.
    Select ADDRESS of STREETS where regexp_like (substr (address,?,?,), '[0-9]');
    --? means that I don't know what to put here!

    I don't know if substr is the best approach to do this, because I want only the last character and the records are of different lengths.

    Thank you!

    Hello

    If you want to use regular expressions:

    WHERE     REGEXP_LIKE ( address
                  , '[0-9]$'
                  )
    

    You can get the same results, no doubt more effectively, without regular expressions:

    WHERE     INSTR ( '0123456789'
               , SUBSTR (address, -1)
               )     > 0
    
  • CSS to force the last character of a paragraph to align differently?

    I have a CSS problem. Let's say I have a paragraphy of 450 pixels wide, text - align left (default). The last line of the paragraph ends at a place which is about three quarters of the total paragraph width. Now, I want to add a span encompassing a last character that is a different color than the text of the previous paragraph and also positions on the side over to the right of the 450 pixels.

    I tried two things that did not work. One was text-align: right and the other was including a couple of spaces before the final character and using tracking to lie, he. Absolutely no effect during each test.

    Help?

    HealthcareHelper wrote:

    Osgood, I just tried your first suggestion and it works! I might have to play with him, because he did exactly as said: go to the right side complete paragraph width and none of the text is going well. It looks like a little isolated.

    I assumed the description you gave in your original post you wanted that he isolated on the far right of the container?

    HealthcareHelper wrote:

    is there a particular reason that offers on a simple float, or was it based on your experience?

    Floating of the seemed to be the logical way to go (I guess on the basis of experience) BUT if you notice that the character is not on the same line as the last line of the point. If this isn't a problem, then it is a possible soultion to consider using.

    HealthcareHelper wrote:

    In addition, was the possible problem of browsers with the second suggestion because of the limited for inline-block support?

    No, inline-block is supported in all browsers I know. I was just being cautious as I had not tested under IE. However this solution with the character on the same line as the last line of the paragraph, I provided it as an alternative.

  • Find the last character in a string aplhanumreic

    Hi guys first time poster long time hiding in the shadows, I hope someone can help me

    I put the stored username and I need to find the last character before the number, for example

    ABC123 that I would like to find c
    AB123 I would find b

    suggestions as to how I could do this?
    Thanks in advance

    Here's one way:












  • How to open search results in the same window in Firefox always done before the last update 22

    Before the last update, on that I would do a search let say Google and when I found what I wanted and clicked on, that the window would turn to the result in this window, now it opens a new window. Another question is I noticed when I have gmail open in a window and open another window that result is displayed, and then switches to the original which was open, modified window and the new window is reduced in the bottom taskbar, and I come back to open it again. Whether measures should be taken, please list them.

    Hi years.1, Flash is used by many sites to play videos and audio. It is also used by some sites for menu or the overall presentation systems. Some sites also use Flash to downloaders of files.

    Firefox in general will let you know if a site needs a plugin to display all of the content, but you may also see a message on the site. These messages are not always specific to Flash, but can sometimes say that JavaScript is disabled or else referring to the problem.

  • I recently got 'Class not registered' when you try to open my PDF files. This didn't happen before the last 2 days

    I recently got 'Class not registered' when you try to open my PDF files. This didn't happen before the last 2 days

    Hi Meenakshi,

    Thanks for getting back to me. The problem is solved now. We had to reinstall Acrobat DC who, for some reason, had disappeared.

    Regards, Randy

  • 90 days before the last month

    Hi guys,.

    Can someone help me to recover data that are 90 days before the last month of a current month.

    Say that the current month is March then I need to get data that are 90 days before the month of February.

    Your timely assistance is appreciated

    Thanks in advance

    Like this?

    where date_field between trunc (add_months (trunc (sysdate),-1), 'months')-90

    and trunc (add_months (trunc (sysdate),-1), 'month')

  • How to create an animation loop files photoshop without them all overlapping on the frame before the last?

    Hi, I use a mac and have attempted to create an animation loop in legacy but when I delete the last keyframe on my original composition, for some reason any all my layers of stitching to merge into one on one before the last keyframe and creates a slight glitch all along. Thank you.

    This could have cache problems. I would approach this kind of animation differently. Instead of sequencing layers could import as a sequence of images. Make sure you have defined the interpretation of your sequence of images based on the cadence of your final file. Looks like you have picked 2 image by image, the standard for animation-Cellulo. 12 fps to 24 fps project where each image is duplicated. So, if that's what you want, import your sequence of photoshop 6 framework as a sequence, the film as 12 fps, drag the sequence in a model of 24 fps which is long enough for the complete shot, enable time remapping effect, go to the last time remap keyframe using the k key and then return a frame by using the page to the top or Ctrl/Cmnd + key left arrow , add a new keyframe, remove the last keyframe and add the expression loopOut(). That's all there is to it.

    If you want to use your sequenced layers and you have a cache problem or a problem of frame between the comps rate then to restore your layer comp sequenced like a movie and loop that.

  • Delete the last character in the input field

    How to remove the last character of an input field?

    It deletes all

    When you click on:

    SYM.$("textfield"). Empty();

    Thank you!

    Try this:

    var inputTxt = sym.$("textfield").text ();

    var truncatedTxt = inputTxt.slice (0, -1);

    SYM.$("textfield"). Text (truncatedTxt);

    HTH,

    Vivekuma

  • Retrieve the Position of the last character of Textlayer

    Dear script Experts!

    I wonder if there is a way to get the properties of the position of the last character in a text layer.
    For example, I used this in ActionScript: txt.getCharBoundaries (txt.length - 1);

    Thanks for any help

    Mike

    Available properties for a text layer are:

    applyFill

    applyStroke

    Dialoguegeneral

    boxTextSize

    fillColor

    Police

    fontSize

    Justification

    pointText

    strokeColor

    strokeOverFill

    strokeWidth

    text

    follow-up

    Last I saw, by the data type character recovery was still not available. Even in AE CC. Any extraction layer text property is based on the first character in the text string. So if each character used a font, point size, kerning, etc. only the values of the first character could be found.

    Re: Is it possible to access the text by character properties via script?

    Some other posts here that speak of the location of the text layer:

    Attribute boxTextSize ADBE Text Document

    Get a text box anchor point after scaling

    You can always ask too.

    Adobe - feature request/Bug Report Form

  • Apply the last character of line color

    Hi all

    I'm newbie in Javascript.

    Question: I want to apply the color to the last character in the line. It does not work.

    My lines are:

    myDocument var = app.activeDocument;

    myLine var = myDocument.stories.everyItem ().lines.everyItem () .getElements ();

    for (i = 0; i < myLine.length; i ++)

    {

    myLine [i] .characters. item(-1). fillColor = "SS";

    }

    I think that the error which was held in the item(-1) only occurance.

    Can someone give the solution?

    / * But if I want to apply the color at the beginning of the line, it works.

    This is the line i follow:

    myDocument var = app.activeDocument;

    myLine var = myDocument.stories.everyItem ().lines.everyItem () .getElements ();

    for (i = 0; i < myLine.length; i ++)

    {

    myLine [i].characters.item (0) .fillColor = "SS";

    }*/

    Hello X,

    You must check the end doubled characters is undesirable space, enter brand, shift enter, etc...

    Please try the JS code below.

    var myDocument = app.activeDocument;
    var myLine = myDocument.stories.everyItem().lines.everyItem().getElements();
    for(i=0; i
    

    THX

    csm_phil

  • Select the records in which the last character in the string is a letter

    Hello
    I have a STREET table with a field NAME where there is a single letter at the end of a few names that shouldn't be there. I want to select all names that are like that. For example: "GREENE * B *", "JOHN BATCH * J."

    what I would do with this query, is to fill a field new name2 with the correct version of the name without the last letter. Ex: "GREENE B"-> "GREENE.
    Would that be a RTRIM command?

    Thank you!
    update t
       set name= TRIM(SUBSTR(NAME,1,LENGTH(NAME)-2))
    WHERE NAME LIKE '% %'
    AND SUBSTR(REVERSE(NAME),2,1) = ' ' 
    

    but, even once, REVERSE (TRIM (SUBSTR (REVERSE (NAME), 3))) would be much faster then using the length

  • the last character to jump printjoins

    My version of oracle is 10.2.0.4.0. I defined the special characters in the printjoins. Therefore, special characters are now stored in the chips, but this isn't the last special character.
    Steps to reproduce:
    create table mywords
    (text varchar2(200));
    insert into mywords values ('HELLO P.L.C.');
    insert into mywords values ('WORLD H.M.');
    -- I define lexer as follows: 
    BEGIN
       --ctx_ddl.DROP_PREFERENCE('my_lexer');
       ctx_ddl.create_preference('my_lexer','BASIC_LEXER');
       ctx_ddl.set_attribute('my_lexer','printjoins','-_~!@#$%^&*(){}[]=?\;><.+');
    END;
    /  
    CREATE INDEX MYWORDS_CTX ON mywords(text) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('lexer my_lexer SYNC(ON COMMIT)');
    Now I'm waiting for the symbolic text to store P.L.C. and H.M. but it only stores P.L.C & hadil
    I won't be able to define the join end as '.' because it is already defined in print join.
    sql> SELECT TOKEN_TEXT FROM DR$MYWORDS_CTX$I WHERE TOKEN_TEXT LIKE 'H.%' or TOKEN_TEXT LIKE 'P.L.%';
    TOKEN_TEXT
    ----------------------------------------------------------------
    P.L.C
    H.M
    All the solutions to store the last special character also?
    Thanks for your time.

    The period is a sign of punctuation by default, as well as the question mark and exclamation mark. When you have the period as a printjoin and a punctuation, punctuation is a priority. Although the last period will not be part of your token, it won't affect your research. You can reset your punctuation to just the question mark and exclamation mark, without the period and which will cause the last period to include in the token, but it will be another problem. If you do this, then once you are looking for the last word of a sentence before a period, you will need to include this period or you won't find it. Please see the demo below shows first what you have with the research work as planned, and then removes the punctuation period, so that the last period is included in the token, but then a search for the last word in a sentence without a period is not found. Thus, it is best to leave things as they are.

    SCOTT@orcl_11gR2> create table mywords
      2    (text varchar2 (200))
      3  /
    
    Table created.
    
    SCOTT@orcl_11gR2> insert into mywords values ('HELLO P.L.C.')
      2  /
    
    1 row created.
    
    SCOTT@orcl_11gR2> insert into mywords values ('WORLD H.M.')
      2  /
    
    1 row created.
    
    SCOTT@orcl_11gR2> insert into mywords values ('This is a test.')
      2  /
    
    1 row created.
    
    SCOTT@orcl_11gR2> BEGIN
      2       ctx_ddl.create_preference
      3         ('my_lexer',
      4          'BASIC_LEXER');
      5       ctx_ddl.set_attribute
      6         ('my_lexer',
      7          'printjoins',
      8          '-_~!@#$%^&*(){}[]=?\;><.+');
      9  END;
     10  /
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> CREATE INDEX MYWORDS_CTX
      2  ON mywords (text)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS
      5    ('lexer        my_lexer
      6        SYNC        (ON COMMIT)
      7        STOPLIST  CTXSYS.EMPTY_STOPLIST')
      8  /
    
    Index created.
    
    SCOTT@orcl_11gR2> SELECT TOKEN_TEXT
      2  FROM   DR$MYWORDS_CTX$I
      3  /
    
    TOKEN_TEXT
    ----------------------------------------------------------------
    A
    H.M
    HELLO
    IS
    P.L.C
    TEST
    THIS
    WORLD
    
    8 rows selected.
    
    SCOTT@orcl_11gR2> SELECT * FROM mywords
      2  WHERE  CONTAINS (text, 'P.L.C.') > 0
      3  /
    
    TEXT
    --------------------------------------------------------------------------------
    HELLO P.L.C.
    
    1 row selected.
    
    SCOTT@orcl_11gR2> SELECT * FROM mywords
      2  WHERE  CONTAINS (text, 'H.M.') > 0
      3  /
    
    TEXT
    --------------------------------------------------------------------------------
    WORLD H.M.
    
    1 row selected.
    
    SCOTT@orcl_11gR2> SELECT * FROM mywords
      2  WHERE  CONTAINS (text, 'test') > 0
      3  /
    
    TEXT
    --------------------------------------------------------------------------------
    This is a test.
    
    1 row selected.
    
    SCOTT@orcl_11gR2> DROP INDEX mywords_ctx
      2  /
    
    Index dropped.
    
    SCOTT@orcl_11gR2> BEGIN
      2    CTX_DDL.SET_ATTRIBUTE
      3        ('my_lexer',
      4         'punctuations',
      5         '?!');
      6  END;
      7  /
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> CREATE INDEX MYWORDS_CTX
      2  ON mywords (text)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS
      5    ('lexer        my_lexer
      6        SYNC        (ON COMMIT)
      7        STOPLIST  CTXSYS.EMPTY_STOPLIST')
      8  /
    
    Index created.
    
    SCOTT@orcl_11gR2> SELECT TOKEN_TEXT
      2  FROM   DR$MYWORDS_CTX$I
      3  /
    
    TOKEN_TEXT
    ----------------------------------------------------------------
    A
    H.M.
    HELLO
    IS
    P.L.C.
    TEST.
    THIS
    WORLD
    
    8 rows selected.
    
    SCOTT@orcl_11gR2> SELECT * FROM mywords
      2  WHERE  CONTAINS (text, 'P.L.C.') > 0
      3  /
    
    TEXT
    --------------------------------------------------------------------------------
    HELLO P.L.C.
    
    1 row selected.
    
    SCOTT@orcl_11gR2> SELECT * FROM mywords
      2  WHERE  CONTAINS (text, 'H.M.') > 0
      3  /
    
    TEXT
    --------------------------------------------------------------------------------
    WORLD H.M.
    
    1 row selected.
    
    SCOTT@orcl_11gR2> SELECT * FROM mywords
      2  WHERE  CONTAINS (text, 'test') > 0
      3  /
    
    no rows selected
    
    SCOTT@orcl_11gR2> 
    
  • TextInput is missing the last character

    My code includes a textinput coded in this way:

                   inWeightField.setPosition(650,240);
                   inWeightField.width = 300;
                   inWeightField.height = 30;
                   inWeightField.textField.restrict="0-9."
                   inWeightField.textField.maxChars=7;
                   //
                   var temp:String = inWeightField.text;
    

    The issue I see is that the last charater in temp is chopped, i.e. If 50.23 is entered, the temp = 50.2

    Why the last char is chopped and how this can be fixed?

    Hey Rita,.

    I think that you run in a kind of race condition. what you do in your listener function? If you set the temp string then most likely, you must use the KeyboardEvent.KEY_UP event instead. I think that the TEXT_INPUT event fires BEFORE any character is placed in the TextInput object. the KeyboardEvent.KEY_UP occurs after the character is displayed in the TextInput object. try to change the event and see what happens. Good luck!

Maybe you are looking for

  • Safari 10 stuttering during scrolling

    After updating to Mac OS and safari 10, I noticed that when scrolling the page animation stutters when slowing down. It is not consistent, but it seems quite often. I can't do with extensions, after you disable Adblock (the only extension I was using

  • Password at startup

    How can I configure my Mac only require a password when starting/restarting, but don't not to wake from sleep?

  • Not able to connect to my netgear router

    I have my netgear router for almost 6 months now, and he has never given the satisfaction of a good wireless on the attic of my house. Repeaters wifi did not work, or are expensive for dual band. Now, I have connected my old linksys E3000 router, and

  • Windows 2003 server is unable to create the object 'user_name '.

    because: unable to update the password. The value provided for the new password does not respect the length, complexity, or the requirement in the history of the area.

  • The calendar entry

    Hi all I'm able to catch an event when a calendar entry has been added by following... Public Sub itemAdded (point PIMItem) How can I get the hour of beginning, location, notes etc from the object passed to the method of tis item? Please point me in