Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Search Statement 1

Status
Not open for further replies.

IndyGill

Technical User
Jan 15, 2001
191
GB
Hi

I am creating an ASP search page which searches through a field (description) and pulls out and words that meet the search criteria. I am using the following SQL statement

"SELECT * FROM directory where description like '%" & Replace(find, "","") & "%'"

However I also want it to search another field in the database (businessName)at the same time, but I am having trouble writing the SQL statement. I am new to SQL so I would be grateful for any help.

Many thanks

Indy




 
"SELECT * FROM directory where description like '%" & Replace(find, "","") & "%' OR theOtherField like '%" & replace(find, "","") & "%'"
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top