How can I limit or truncate a field after a certain # of char.?

  • Thread starter Thread starter Wendy P.
  • Start date Start date
W

Wendy P.

I am stumped! :-)

I'm creating a query using a SQL statement pasted from MS
Access to FrontPage for an ASP Page.

SELECT Products.Link, Products.Category,
Products.ImageSmall, Products.Description
FROM Products
WHERE Products.Category LIKE '%Specials%'
ORDER BY Products.ProductName;

The Products.Description is a Memo field. I would like to
limit the results on the ASP page to only show the first 50
characters of the description. There has GOT TO BE a
simple code to add to my statement to achieve this, right?

THANKS!
 
SELECT Products.Link, Left(Products.Category, 50) As PCategory,
Products.ImageSmall, Products.Description
FROM Products
WHERE Products.Category LIKE '%Specials%'
ORDER BY Products.ProductName;
 
I would like to
limit the results on the ASP page to only show the first 50
characters of the description.

Yes: instead of selecting Description, select

Left([Description], 50)
 
Back
Top