Get path from string in an column

I have an data with text and url. I need to seprate the url only in the column and display in sql query
Need to get data after Url: and the next immediate " " {blank space}
my data is like below
seach engine Url: www.bing.com this is the world famous search enging
mail box Url: www.hotmail.com email is free
microsoft webstie Url: http:\\microsoft.com the home page of microsoft.
ShanmugaRaj

Try the below:
Create table Test_Shan(Textstring Varchar(1000))
Insert into Test_Shan Values ('seach engine Url: www.bing.com this is the world famous search enging'),
('mail box Url: www.hotmail.com email is free'),
('microsoft webstie Url: http:\\microsoft.com the home page of microsoft.')
Select substring(LTRIM(stuff(Textstring,1,CHARINDEX('Url:',Textstring)+4,' ')),0,charindex(' ',LTRIM(stuff(Textstring,1,CHARINDEX('Url: ',Textstring)+4,' ')),0))
From Test_Shan

Similar Messages

  • Get chars from string of numerals

    here is what I would like to accomplish:
    Put the last four integers of the systemDate into a variable so I can do some math with them.
    Thanks.

    Excellent.  Thank you for the info.  Very helpful.
    Dewey
    From: jchunick [email protected]
    Sent: Friday, June 03, 2011 4:20 PM
    To: Dewey Parker
    Subject: Re: get chars from string of numerals
    This is a post I made for the wiki which should help: http://director-online.com/dougwiki/index.php?title=Undocumented_Lingo#the_systemDate

  • How to get substring from string starting from the end of string

    Hi
    How to cut from string:
    $A=C:\ClusterStorage\Volume1\WXP-plwropc300\Virtual Hard Disks\WXP-PLWROPC300_EE20E00F-315E-4781-A6DE-68497D4189B8.avhdx
    this substring (name of VHD file): WXP-PLWROPC300_EE20E00F-315E-4781-A6DE-68497D4189B8.avhdx
    This script should be universal so the best way to be cut all leters from the end of string $A till get the first mark \
    Thank you for help.
    Tomasz
    Kind Regards Tomasz

    PS > Split-Path 'C:\ClusterStorage\Volume1\WXP-plwropc300\Virtual Hard Disks\WXP-PLWROPC300_EE20E00F-315E-4781
    -A6DE-68497D4189B8.avhdx' -leaf
    WXP-PLWROPC300_EE20E00F-315E-4781-A6DE-68497D4189B8.avhdx
    PS >
    That is what "Split-Path" is for:
    ¯\_(ツ)_/¯

  • What is the best way to get PATHS from one Photoshop psd file to another?

    Hi! New on the site, and I signed up specifically to ask the best way to import one .psd file into another, including the paths on the paths palette.
    Almost all of my Photoshop drawings make heavy use of vector paths, which I then stroke using using PS natural-media brushes and the "stroke paths" function (usually with "simulate pressure" checked.) Also, my .psd files tend to be, um, HUGE... and I typically break up a whole drawing into separate PS files and then assemble all of them into one final finished graphic.
    I have no trouble moving raster stuff from file to file. Just put all the layers I want to transfer into a group and drag the group to the other .psd. Works fine, including layer masks. But I have not found a good way to get vector paths from the Paths palette of one .psd to another. Of course I can select paths and copy them to the Win clipboard, switch to the other .psd, and paste them back in. The drawback to that method is that I lose the correct size relation between the results of previously done "stroke paths" operations (on raster layers) and the paths that generated them. Sometimes the copied-in paths are way too large, sometimes way too small, never Just Right.
    As I'm sure most of you know, if you resize an entire Photoshop document from within PS, any paths it contains are correctly resized along with everything else. That's no longer true after grouped raster layers are dragged over to another document but paths are copied and pasted in. The size connection is lost. (Location placement, too.)
    I WANT those paths! After I bring a piece of a drawing into the full final drawing, what looked good when I was working on it separately often doesn't look right any longer and I want to re-stroke those paths using different brush diameter, opacity, etc., or maybe even a completely different brush.
    I've tried bring outside .psd files in as smart objects with the Place command but either that doesn't work or I'm not doing it right. Using Place, the paths in the Placed document don't come in at all.
    I'll be very grateful for any hints or strategies any of you knowledgeable folks can give me. Thanks very much!
    Jim
    Note, PS CS3 extended on Win 7 pro.

    Denny
    1. Connect the two macs - firewire, ethernet, sneakernet as suits you - and copy the iPhoto Library Folder from Old Machine to New Machine. Drag it from Home/Pictures to the same location on the new machine.
    2. Because all the files 'belong' to the account on the old machine, you have to update the file permissions: hence Download BatchMod from
    http://macchampion.com/arbysoft/
    And apply it to the iPhoto Library Folder using the settings found here:
    http://homepage.mac.com/toad.hall/.Pictures/Forum/BatChmod.png
    (Credit to Old Toad for this one).
    Note: This must be run on the new machine after copying the files over.
    3. Then launch iPhoto on the new machine.
    Regards
    TD

  • Getting path from file

    Good Morning,
    Is there a way to get a file path from a file without having to select it through client_get_file_name?
    for example i have a file 'test_01.txt' in C:/
    I cannot hard code the path as each day the txt name will change eg. 'test_02'.
    Is there another way to select the full path name in C:/ where file like 'test%'?
    Thank you in advance,
    D

    Sorry francois ill be a more clear
    On a variable i want to keep changing the path provided.
    For example one day will be var:='C:/Test_01'
    next day will be var:='C:/Test_03'
    as the last number is generated randomly im trying to figure a way to get the correct path in C:/ where the name corresponds to 'test' so i can pass it to my variable
    Edited by: 794018 on 18-Oct-2012 00:50

  • How to get InputStream from String ?

    Hi !
    I want to get InputStream object from String.
    String str = "balabalabala";
    InputStream stream = getInputStream(str);
    How to realize getInputStream(str) function ?
    Thanks!

    The preferred method nowadays is to use Readers and Writers for String data - hence StringReader(String). If you're going to operate on the InputStream directly, then I'd modify your code to use the Reader calls and go that route.
    If, however, you need to pass the InputStream to some other piece of API that requires an InputStream instead of a Reader, then the ByteArrayInputStream is probably your best bet. StringBufferInputStream is deprecated because it doesn't work reliably in the face of many character encodings.
    Speaking of encodings - never call Strng.getBytes() - always use the getBytes(character-encoding) version, so you KNOW what encoding you're getting!
    Grant

  • How can I get path from af: inputFile or a uploadedFile

    Hi, there,
    I am getting error messages while sending attachment.
    I firstly tired getting the attachment from <af:inputFile> and attach it to the email. It failed. Then I put the file name directly into my code, still choose the same file from the <af:inputFile>, it failed again. However, from the code you can see, I can get system out println to print the file name, even the file content.
    I realized that I might need the file path, but I don't konw how I do get the path, should I write code in the backing bean of uploadedFile or in the send() in the Application Module ? How can I get the path?
    any advice is welcome and thank you very much!
    The system.out.println result is
    08/05/09 11:56:38 2javax.activation.FileDataSource@1674b36
    08/05/09 11:56:38 2.1 jkljlj
    08/05/09 11:56:38 2.2New Text Document.txt
    But the error message still says :
    nested exception is:
    class javax.mail.MessagingException: IOException while sending message;
    nested exception is:
    java.io.FileNotFoundException: New Text Document.txt (The system cannot find the file specified)
    Here is my code:
    ViewObject issueView = getIssueView1();
    Row x = issueView.getCurrentRow();
    String fileName = "New Text Document.txt";
    System.out.println("1 " + fileName);
    System.out.println("1.5 " + x.getAttribute("attachmentName"));
    // msg.setText(body);
    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setText(body);
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    // String attachmentName = (String)x.getAttribute("attachmentName");
    //if (attachmentName != null) {
    MimeBodyPart mbp2 = new MimeBodyPart();
    DataSource source = new FileDataSource(fileName);
    System.out.println("2" + source);
    System.out.println("2.1 " + x.getAttribute("attachment"));
    mbp2.setDataHandler(new DataHandler(source));
    //mbp2.setFileName(source.getName());
    mbp2.setFileName(fileName);
    System.out.println("2.2" + fileName);
    mp.addBodyPart(mbp2);
    msg.setContent(mp);
    // send the message!
    getDBTransaction().commit();
    Transport.send(msg);
    System.out.println("\nMail was sent successfully.");
    } catch (Exception e) {
    System.out.println("Error: " + e.getMessage());
    }

    I wish you and others like you would say what you are trying to do, not how you are trying to do it. That would save those who would like to help the trouble of figuring it out. However, I'm going to make a guess at what you are doing. Tell me if I'm right.
    You are writing a page that lets a user construct an e-mail message. I assume that the page has fields like: addressee, subject, and message. It also has a field, defined as an <af:inputFile> component for getting a file to be added as an attachment to the e-mail.
    You will want to look at forum posts and tutorials about how to upload a file. You will see that the "value" attribute of an <af:inputFile> will normally contain EL referencing a property of a backing bean which has the UploadedFile class. This class has methods for getting the filename, MIME content type, and an InputStream containing the data in the uploaded file. These pieces of information are all you need to add an attachment to an e-mail. You don't need the file's path, which is a good thing, since that information is not available to you.
    I've never used Javamail, so I can't tell you exactly how to use it, but I do understand the basics of sending e-mail. What you are going to do is create a multi-part message. The first part will be the message itself. Subsequent parts are the attachments. Each attachment can have it's filename and MIME content type set. Then you read the file through it's InputStream and write it to the message content. If the file contains binary data, you will need to pass it through a filter that will encode it to the Base64 format - which represents your data as 7 bit bytes.
    You will NOT be using the database connection or anything from the data controls to send an e-mail, unless you also need to save a copy to the database. The connection that is needed for e-mail is a connection to an SMTP service. Ask your e-mail administrator for some help with this.
    You MIGHT want to write most of this code in your Model project as a business component. Then your backing bean would probably just pass the fields as parameters.

  • Build path from string control

    Does anyone know why when I Use a string constant fed into a build path function my vi creates the file properly but when I change it to a control so that I can input a number to the file name I get error 1059 unexpected file type?
    Solved!
    Go to Solution.

    I'm trying to write to a file each time I update data. Everything was working fine until i realized that each time I stop excecution and start back up I lose all data if I replace it again so I wanted to be able to add a new number of my choosing each time to the file name but keep the full base name. I also wanted it to save in a base location while creating a new folder for each month and each day. If i a string control and concatenate it the error comes from the open/create/replace function but doesn't come up when I use a string constant.
    The first picture is my vi and the 2nd is the sub vi used to create the folder if it doesn't exist
    Attachments:
    File Saver 1.jpg ‏45 KB
    File Saver 2.jpg ‏58 KB

  • [CS4] How to get path from SPPlatformFileSpecification on mac ?

    Hi all,
    sADMBasic->StandardGetDirectoryDialog() return the directory selected by user in SPPlatformFileSpecification type variable.
      when I select the any directory i.e desktop SPPlatformFileSpecification  structure contains the following  values--
    short vRefNum =  -100
    long parID        =   371658
    unsigned char name[64] = '\0'
    is there any API or alternatives which give the path as char or string like -  "/Users/User1/Desktop" from these values?
    thanks
    D.A

    Try this:
    SPPlatformFileSpecification spec;
    // do sADMBasic->StandardGetDirectoryDialog()
    ai::FilePath path;
    sAIFilePath->SetFromSPFileSpec(spec, path);
    Then talk to path to get your location. Hopefully that does the job. I've never used StandardGetDirectoryDialog() though, so for all I know its broken.

  • How to get substring from string using index?

    hi,
    here i am having string ,
    i want the pullareddy from below line ,
    i know how to get from substring.
    but i want to get the above using "index",
    can any help how to do it?
    String str1="janapana,pullareddy, in malaysia";
    jpullareddy

    get the start index with indexAt("pullareddy")
    get the end index with adding the length of the word to the start
    get the char[] of str1 with toCharArray()
    make a new string with the chars from start to end index.

  • Get data from string

    My Table Column have below data
    COLUMN A
    Name of my Country is India
    I am from Country Japan
    My Country is China
    How to get result as below
    "Country is India"
    "Country Japan"
    "Country is China"
    ShanmugaRaj

    Try:
    DECLARE @t TABLE (Info VARCHAR(300));
    INSERT INTO @t (Info)
    VALUES ('Name of my Country is India')
    ,('I am from Country Japan')
    ,('My Country is China')
    ,('Testing');
    SELECT Info
    ,substring(Info, NULLIF(charindex('Country', Info), 0), LEN(Info)) AS [Country Info]
    FROM @t;
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Get Items from String

    VB.net
    I need to get the third and forth item from a string. The string varies in items within delimiter and total number of delimiters.
    My delimiter is :
    MyString = "ALL:0:Red:11Green:31:Blue:217"
    MyItems = "Red:11"
    Also, if elements 3 and 4 are not there, messagebox.show("Items don't exist.")
    Thanks,
    ADawn
    ADawn

    There is a : between 11 and Green.
    "ALL:0:Red:11:Green:31:Blue:217"
    ADawn
    ADawn
    Then it's even easier.
    Option Strict On
    Option Explicit On
    Option Infer Off
    Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim s As String = "ALL:0:Red:11:Green:31:Blue:217"
    Dim parts As List(Of String) = s.Split(":"c).ToList
    Dim allLabel As String = parts(0)
    Dim allValue As String = parts(1)
    Dim redLabel As String = parts(2)
    Dim redValue As String = parts(3)
    Dim greenLabel As String = parts(4)
    Dim greenValue As String = parts(5)
    Dim blueLabel As String = parts(6)
    Dim blueValue As String = parts(7)
    MsgBox(String.Format("{0}:{1}", redLabel, redValue))
    End Sub
    End Class
    “If you want something you've never had, you need to do something you've never done.”
    Don't forget to mark
    helpful posts and answers
    ! Answer an interesting question? Write a
    new article
    about it! My Articles
    *This post does not reflect the opinion of Microsoft, or its employees.

  • Get number from string

    Hi,
    I have a problem with an select.
    I need to compare two string columns. First column includes only a number with 9 characters:
    '001234567'
    Second column includes text where somewhere inside this text is the number 001234567.
    'Hallo1 001234567'
    I need to extract the 9 character big number out of the string. I thought using the regular expression feature could help me.
    SELECT
      REPLACE(REGEXP_REPLACE('hallo 001122334', '[a-z]', ''),' ') "REGEXP_REPLACE"
    FROM dual;But this would exclude the number 1 after Hallo:
    Result: '1001234567'
    The number I look for is always 9 character long.
    Thanks ahead,
    Tobias

    You have many variants:
    with your_table as
         (select
                'hallo1001122334' first_column,
                '001122334' second_column
          from dual
    select *
    from your_table
    where
    --1) regexp_like(first_column,'.*'||second_column||'$')
    --2) first_column like '%'||second_column
    --3) regexp_substr(first_column,'\d{9}$')=second_column
    --4) regexp_replace(first_column,'\D','') like '%'||second_columnFourth variant - includes case when chars can be between numbers in first column (for example 'hallo100a1a1a2a2a3a3a4').

  • Help on getting value from string

    Hello can someone please help me with my code?
    I would like to know how to get a value in a string as an integer type
    This is what I have so far
    String x = "12345";
    for(int f=0; f<5; f++){
    int c = stringDigits.charAt(f);     
    sum += c;                
    However the sum does not turn out to be 1+2+3+4+5 = 15 because the value of c will always turn out to be 48 more than it is supposed to be
    for example when f = 1 then c would = 49
    f = 2 then c would = 51
    Thank you very much for your help

    int i = Integer.parseInt(x);
    Will convert the String to an integer.The original poster was looking for a way to convert a single digit in a string to its numeric value, not to convert the whole string to an integer.
    I forgot to mention that this is contained in the
    java.text package, so you will need to
    import java.text.*;Integer is in the java.lang package, so no import is necessary.

  • Can we get Arraylist from String.Please check the code

    Hi all,
    I have just pasted my code over here.Can anyone of you find the solution for obtaining the Array list from the String.
    For Example :
    ArrayList al = new ArrayList();
    al.add(new byte[2]);
    al.add("2");
    String stringVar = "" + (ArrayList) al;
    Here I can convert the arraylist into string.But can we do he vice versa like obtaining the above arraylist from the string?If please advice me.
    URGENT!!!!

    cudIf you run the code you posted you will observe that the string form of the list does not contain all the information of the list: in particular the array elements are missing. It follows that the "vice versa" conversion you seek is simply not possible.
    A variation on this theme is the following:import java.util.ArrayList;
    public class ListEg {
        public static void main(String[] args) {
            ArrayList al = new ArrayList();
            al.add("foo");
            al.add("bar, baz");
            String stringVar = "" + (ArrayList) al;     
            System.out.println(stringVar);
    }If you think about the output you should be able to conclude that lists with different contents can easily have the same string form.
    Just something to chew on.

Maybe you are looking for

  • Using External HD connected to Time Capsule

    I am posting this mainly as a success story, but if anyone sees a potential pitfall with my setup please speak up. I am a brand new Mac user as of two months ago. I purchased a new iMac (intel) with OS(X) Leopard and a 500GB Time Capsule. The learnin

  • HT201269 iPod to iPhone connection

    Is it possible to download my music from my iPod directly to my new iphone5 without using iTunes or iCloud? I have a camera adapter that will fit into the iPod that has a USB port on the other side that the cord for the iPhone will plug into.

  • Open website in mobile version

    How can I prevent Safari opening the website from mobile version?  Thanks!

  • How to hide default Oracle logo etc.?

    I have a 'Chart' which requires 2 parameters. The Chart is exposed as a Portlet. When I click on 'Customize' link, then I get the screen with the Oracle and other images. How can I make this screen look different? To what extent can we customize it?

  • Ess Customization by NWDS

    Hello all, I have two question. 1. i have to customize the ESS web dynpro application e.g. Address Screen for USA and SAUDI. we have to add the date field "Hijra Date" and "Hijra Age" from the Backend for saudi and have to add some fields on USA as w