substring + charindex

  • Good morning all

    I have this text string

    \\A1-SRV-05\REPRISE-sollyazar\Allianz_ged\NOVAXEL\ALLIANZ_1\CAL000242\Volvo Allianz\VAZP00069\documents entrants\Gestion Interne RClient - TR- A TRAITER PAR GESTION PARTENAIRES - DEVIS - VAZP00_21835512.MSG

    and I will recover this value

    VAZP00069

    I tried with substring and charindex but without result

    thanks for your help

     

  • What did you already try?  I would try splitting the string and selecting the element you require.

    John

  • Duplicate post. See here

    To the OP: what was wrong with the previous solution?

    • This reply was modified 5 years, 7 months ago by Phil Parkin.

  • Answer moved to a different thread

    • This reply was modified 5 years, 7 months ago by Jonathan AC Roberts. Reason: moved answer to https://www.sqlservercentral.com/forums/topic/substring-chrindex/#post-3721591
  • Posting to the original thread would have helped avoid fragmentation of replies.


Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply