Searching Text Fields

  • How do I search a particular field for a given string? For instance if I have a productDescription field, that contains a 30 word description of a particular Car for example, how would I search for the word RED or AIR CONDITIONING etc? I assumed that I could use fairly simple SQL and ASP to search for a word or phrase but all attempts to find the syntax appear to suggest its not possible???

    Thanks for your help,

  • Try using the InStr function. 

  • You can also use LIKE:

    Select * from myTable where myTextField like "*red*"

    Or in SQL Server

    Select * from myTable where

    myTextField like '%red%'

    Aunt Kathi Data Platform MVP
    Author of Expert T-SQL Window Functions
    Simple-Talk Editor

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply