Q:

Split string in T-SQL

How can I get the string "text." from the string "This is my text."?

A:

SELECT SUBSTRING('This is my text.',CHARINDEX('text.','This is my text.'),5)
Right() will fail if text. will be in middle of the string. 

A:

SELECT RIGHT('This is my text.',5)

