Help on searching text fields

Results 1 to 2 of 2

Thread: Help on searching text fields

  1. #1
    Join Date
    Dec 1969

    Default Help on searching text fields

    I want to search through a text field in my sql server database. How can i make it to search for a specific word in text field and not the whole field? (Like search engines do)<BR>Thank you in advance

  2. #2
    Join Date
    Dec 1969

    Default Full Text Indexing.

    SQL Server provides functionality called "Full Text Indexing". It is going to be the most robust thing for you to do.<BR><BR>OR, in a simpler form (and not the fastest), just do a LIKE query.<BR><BR>For instance you have a text field called "txtKeyword" and you want to find that in a string in a field. You would do:<BR>strSQL = "SELECT * FROM TheTable WHERE TheDescriptionField LIKE &#039;%" & Replace(Request.Form("txtKeyword"), "&#039;", "&#039;&#039;") & "%&#039; "<BR><BR>-Doug

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts