Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Truncate string in search results?


Message #1 by "Ben Clemens" <ben@b...> on Tue, 11 Dec 2001 05:07:46
Hi; Sorry if this is a basic question, I am new to programming in 

general. Any help is gratefully received...



I created a search/results/detail page set that connects to an Access2002 

database, retrieving title and other fields in the search results. What I 

would like to do is display the first 128 charcters of a long (usually 

~600 char) description field on the search results page. So far nothing 

I've tried works, and I fear I may be in over my head. Is there a simple 

ASP solution for this in code, or a stored procedure that I should call? 

If so, what would be the general structure of it?



Thanks very much,



Ben



ben@b...
Message #2 by "Ken Schaefer" <ken@a...> on Tue, 11 Dec 2001 18:42:31 +1100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Ben Clemens" <ben@b...>

Subject: [access_asp] Truncate string in search results?





: I created a search/results/detail page set that connects to an Access2002

: database, retrieving title and other fields in the search results. What I

: would like to do is display the first 128 charcters of a long (usually

: ~600 char) description field on the search results page. So far nothing

: I've tried works, and I fear I may be in over my head. Is there a simple

: ASP solution for this in code, or a stored procedure that I should call?

: If so, what would be the general structure of it?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



What's wrong with:



SELECT LEFT(long_field_name, 128) FROM table1



?



LEFT() is in Access 2000 help. I assume it'd still be available in

Access2002



Cheers

Ken




  Return to Index