Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Part of a text...

Discussion in 'Information Technology' started by Joel, Oct 28, 2005.

Tags:
  1. Joel

    Joel
    Expand Collapse
    Guest

    Hello All.

    I was wondering if there was a way to get the end part of a text after a
    cretain character.

    EX: I have this saved in my DB for a linked photo C:\mypics\Old\0001.jpg

    There are many different folders the pictures are in and different lenght
    filenames, so I could end up with something like this: (
    C:\mypics\Old\0001.jpg) and (C:\pics\New\MyNewCar.jpg).

    When I run a report, i would only like the part after the last \ to show
    (0001.jpg) and (MynewCar.jpg).

    TIA,
    Joel
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News US Lawmakers Partake In Sikh Tradition Of 'Langar' On Capitol Hill - Asian Fortune Breaking News Jul 23, 2016
    Sikh Gurus Sikh History Vol 2, Guru Nanak Sahib (Part B) History of Sikhism Jun 26, 2016
    Sikh Gurus Sikh History, Vol 1: Guru Nanak Sahib (Part A) History of Sikhism Jun 26, 2016
    Sikhism Sikhism In Iran – A Part Of Cultural Diaspora Sikh Sikhi Sikhism May 18, 2016
    Sarbjit Singh Dhunda | Guru Angad Darbar | April 28, 2016 Part 1 Of 2 Gurmat Vichaar May 1, 2016

  3. Ofer

    Ofer
    Expand Collapse
    Guest

    Try this

    mid(Path,instrRev(Path,"\")+1)
    --
    If I answered your question, please mark it as an answer. That way, it will
    stay saved for a longer time, so other can benifit from it.

    Good luck



    "Joel" wrote:

    > Hello All.
    >
    > I was wondering if there was a way to get the end part of a text after a
    > cretain character.
    >
    > EX: I have this saved in my DB for a linked photo C:\mypics\Old\0001.jpg
    >
    > There are many different folders the pictures are in and different lenght
    > filenames, so I could end up with something like this: (
    > C:\mypics\Old\0001.jpg) and (C:\pics\New\MyNewCar.jpg).
    >
    > When I run a report, i would only like the part after the last \ to show
    > (0001.jpg) and (MynewCar.jpg).
    >
    > TIA,
    > Joel
    >
    >
     
  4. Joel

    Joel
    Expand Collapse
    Guest

    Thanks for they very quick responce Ofer, it worked great.

    Could you explain exactly how it works? (if its not too much trouble)

    Thanks Again,
    Joel

    "Ofer" wrote:

    > Try this
    >
    > mid(Path,instrRev(Path,"\")+1)
    > --
    > If I answered your question, please mark it as an answer. That way, it will
    > stay saved for a longer time, so other can benifit from it.
    >
    > Good luck
    >
    >
    >
    > "Joel" wrote:
    >
    > > Hello All.
    > >
    > > I was wondering if there was a way to get the end part of a text after a
    > > cretain character.
    > >
    > > EX: I have this saved in my DB for a linked photo C:\mypics\Old\0001.jpg
    > >
    > > There are many different folders the pictures are in and different lenght
    > > filenames, so I could end up with something like this: (
    > > C:\mypics\Old\0001.jpg) and (C:\pics\New\MyNewCar.jpg).
    > >
    > > When I run a report, i would only like the part after the last \ to show
    > > (0001.jpg) and (MynewCar.jpg).
    > >
    > > TIA,
    > > Joel
    > >
    > >
     
  5. Ofer

    Ofer
    Expand Collapse
    Guest

    The function instrRev return the location of the last "\" in the string
    The mid function return the string from a certain position forward

    So the combination of the two, will return the string to the right of the
    last "\"

    mid(Path,instrRev(Path,"\")+1)
    --
    If I answered your question, please mark it as an answer. That way, it will
    stay saved for a longer time, so other can benifit from it.

    Good luck



    "Joel" wrote:

    > Thanks for they very quick responce Ofer, it worked great.
    >
    > Could you explain exactly how it works? (if its not too much trouble)
    >
    > Thanks Again,
    > Joel
    >
    > "Ofer" wrote:
    >
    > > Try this
    > >
    > > mid(Path,instrRev(Path,"\")+1)
    > > --
    > > If I answered your question, please mark it as an answer. That way, it will
    > > stay saved for a longer time, so other can benifit from it.
    > >
    > > Good luck
    > >
    > >
    > >
    > > "Joel" wrote:
    > >
    > > > Hello All.
    > > >
    > > > I was wondering if there was a way to get the end part of a text after a
    > > > cretain character.
    > > >
    > > > EX: I have this saved in my DB for a linked photo C:\mypics\Old\0001.jpg
    > > >
    > > > There are many different folders the pictures are in and different lenght
    > > > filenames, so I could end up with something like this: (
    > > > C:\mypics\Old\0001.jpg) and (C:\pics\New\MyNewCar.jpg).
    > > >
    > > > When I run a report, i would only like the part after the last \ to show
    > > > (0001.jpg) and (MynewCar.jpg).
    > > >
    > > > TIA,
    > > > Joel
    > > >
    > > >
     
  6. Joel

    Joel
    Expand Collapse
    Guest

    Thank you much =)

    "Ofer" wrote:

    > The function instrRev return the location of the last "\" in the string
    > The mid function return the string from a certain position forward
    >
    > So the combination of the two, will return the string to the right of the
    > last "\"
    >
    > mid(Path,instrRev(Path,"\")+1)
    > --
    > If I answered your question, please mark it as an answer. That way, it will
    > stay saved for a longer time, so other can benifit from it.
    >
    > Good luck
    >
    >
    >
    > "Joel" wrote:
    >
    > > Thanks for they very quick responce Ofer, it worked great.
    > >
    > > Could you explain exactly how it works? (if its not too much trouble)
    > >
    > > Thanks Again,
    > > Joel
    > >
    > > "Ofer" wrote:
    > >
    > > > Try this
    > > >
    > > > mid(Path,instrRev(Path,"\")+1)
    > > > --
    > > > If I answered your question, please mark it as an answer. That way, it will
    > > > stay saved for a longer time, so other can benifit from it.
    > > >
    > > > Good luck
    > > >
    > > >
    > > >
    > > > "Joel" wrote:
    > > >
    > > > > Hello All.
    > > > >
    > > > > I was wondering if there was a way to get the end part of a text after a
    > > > > cretain character.
    > > > >
    > > > > EX: I have this saved in my DB for a linked photo C:\mypics\Old\0001.jpg
    > > > >
    > > > > There are many different folders the pictures are in and different lenght
    > > > > filenames, so I could end up with something like this: (
    > > > > C:\mypics\Old\0001.jpg) and (C:\pics\New\MyNewCar.jpg).
    > > > >
    > > > > When I run a report, i would only like the part after the last \ to show
    > > > > (0001.jpg) and (MynewCar.jpg).
    > > > >
    > > > > TIA,
    > > > > Joel
    > > > >
    > > > >
     

Share This Page