Hi I have the following text in a column of text type.
I am trying to extract the SPROC name from the following string
“exec risp_GetBusinessUnitSupportEmail 100488”
I have got to this point so far. Where I do a substring on the first occurrence of the characters “risp”. However I don’t know how to find the end of the sproc name i.e. the empty string without making it too complex. Can someone help in simplifying it. Thanks
select top 1 convert(varchar(100),TextData),
substring ( convert(varchar(100),TextData), charindex( 'risp' , convert(varchar(100),TextData) ), 1 )
from ritrace (nolock) where textdata is not