Lorna70
asked on
How can I display a summary of info from a Text field in DB?
Hi I want to display only the first 200 chars of text stored in the DB as a text field. How do I do this so that it is cut off after a word and not in the middle of a word?? Also, I am displaying the text in a GridView.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks - I didn't use the T-SQL solution but didn't know about SUBSTRING so thank you Akila :-)
Open in new window
btw, i used 20 just for testing, you should first check if the string length is more than 200:
Open in new window