View Single Post
  #1 (permalink)  
Old December 27th, 2004, 04:45 PM
phungleon phungleon is offline
Friend of Wrox
Join Date: Jul 2003
Location: , , .
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Search Does not go beyond 1st word in field

Hi All,

I have 2 fields in SQL 2000 Database, called "Fields_of_interest" and "Name." Users input their data into them. What I want to do is be able to search on the "fields_of_interest" field. So for example, I have two records inputed.

Name: Fields_of_interest:
Leon security, IT, programmer
John security, accounting,

Here is the problem. In an ASP "search" page that I have created, when I do a search, I can ONLY search on the first word of the "Fields_of_interest" field. In other words, let say I want to search for someone who is interested in Accounting. I will get a NO record result, because the query is not looking for anything beyond the first word in the field. Any idea why it is doing this? Below is my query.

mySQL="SELECT ApplicantID, firstname, lastname, email, start_date, end_date, fields_of_interest, academic_level, academic_goals, career_goals FROM internship_form where isArchive=1"

mySQL=mySQL & " AND fields_of_interest like '" & fields_of_interest & "%'"
Reply With Quote