Returning data with a max text length

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • malukj
    New Member
    • Mar 2010
    • 2

    #1

    Returning data with a max text length

    Hi,
    I wish to return only the data where the 'name' field (text) is 27 characters or less.
    I've searched but cannot find a solution.

    objRS.Open "SELECT * FROM products WHERE (notes<>'' AND available='' And image<>'default .gif') AND (catcode=18 or catcode=16 or catcode=35)"

    This is obviously returning everything, can I amend it to only return the records where 'name' is 27 characters or less?

    Thanks in advance.
  • GazMathias
    Recognized Expert New Member
    • Oct 2008
    • 228

    #2
    This is a database question, not an ASP question.

    Regardless, investigate the Len() function or its equivalent for whatever database you are using, since you do not say.

    Gaz.

    Comment

    Working...