Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read more links 1

Status
Not open for further replies.

aaronjonmartin

Technical User
Jul 9, 2002
475
GB
Ok this may be a bit of a newbie question but here goes anyway:

I have a field in a database which contains 5000 characters, I want to display a particular amount of these characters (say 100) in a template column of a datagrid. Then after them provide a link which when clicked loads a new page which displays the full amount of characters (a click to read more link). What would be the best way of displaying just 100 of the characters?

Thanks for any help in advance

"It's so much easier to suggest solutions when you don't know too much about the problem."
Malcolm Forbes (1919 - 1990)
 
Just do it in the SQL e.g.
Code:
SELECT ID, SUBSTRING(FIELD1,1,100) AS SHORTDESC, FIELD1 AS LONGDESC FROM TABLE1


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Ah hadnt thought of that, will give it a try thanks

"It's so much easier to suggest solutions when you don't know too much about the problem."
Malcolm Forbes (1919 - 1990)
 
worked a treat mate thankyou

"It's so much easier to suggest solutions when you don't know too much about the problem."
Malcolm Forbes (1919 - 1990)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top