Extracting the string before and after the given character

  • Hi All,

    I want to extract the string before and after the given characters.

    Example:

    ijk.nl?utm_source=linkedin.com&utm_medium=company+page

    Character is : ?

    I need in two separate columns the  string character before ? and after ?

     

     

     

     

  • You can use "CHARINDEX" to find out the position of that character. Then you would use "SUBSTRING" to extract each of the two strings you want. That is the basics.

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

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