none
t-sql equivalent to substring from the right/instring?

    Question

  • Is there a t-sql equivalent to starting a substring from the right?  And an instring equivalent?  I see that there is a "right" function, to start from the right (I'm on the correct path here, yes?), but I don't know the "instring" equivalent to tell it how many characters to go.

    Thank you --

    Donna

    Monday, May 10, 2010 7:19 PM

Answers

  • Have a look at CHARINDEX, this is basically the T-SQL versino of InString.

    You might also be interested in PATINDEX.

     

    -- 

    Gert-Jan

    Monday, May 10, 2010 9:50 PM

All replies