I am moving some code from one of my SP's to my app code and I am not quite sure how to accomplish the same thing in C#. here is what I am trying to do ("Get ONLY the first name (and pref. omit any trailing initials) from an alphaname field which is in the format [lastname], [firstname] [optional initial]
Here is my T-SQL (but it doesn't omit initals):
SUBSTRING(sr.AlphaName, CHARINDEX(',', sr.AlphaName) + 1, len(sr.AlphaName)) As 'First Name'
Thanks to all who can offer some wisdom!!!