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

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!
 
K

Ken Snell

SELECT Products.Link, Left(Products.Category, 50) As PCategory,
Products.ImageSmall, Products.Description
FROM Products
WHERE Products.Category LIKE '%Specials%'
ORDER BY Products.ProductName;
 
J

John Vinson

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top