A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Hi @tani oju ,
Welcome to the Microsoft SQL Server Q&A Forum!
Please refer to:
select right([Name],len([Name])-charindex('_',[Name],charindex('_',[Name])+1)) [name]
from [dbo].[product_details]
Output:
name
pen
pen_two
ted_ted_pen
te_de_rd_te
If you have any question, please feel free to let me know.
If the response is helpful, please click "Accept Answer" and upvote it.
Regards
Echo
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.