Thursday, January 7, 2010

Substring

SUBSTRING(expression,start,length)

DECLARE @SampleString VARCHAR(11)


SELECT SUBSTRING(@SampleString,-11,22)
Start = -11
Length = 22
Result is : (-11 + 22) - 1 = 10, So that it returns 10 Chanacters : Dotnetfund

No comments:

Post a Comment