Jan 29, 2004 #1 Mayoor Programmer Jan 16, 2004 198 GB Can anyone help with the syntax? So far I have SELECT * FROM nsc_community WHERE users LIKE %Mike however I'd like to also search the desription field as well. Would it be as simple as separating the field names with a comma?
Can anyone help with the syntax? So far I have SELECT * FROM nsc_community WHERE users LIKE %Mike however I'd like to also search the desription field as well. Would it be as simple as separating the field names with a comma?
Jan 29, 2004 #2 mimi2 Technical User Apr 2, 2002 407 CA i am not sure i understand. if you want to filter on nsc_community and description fields: SELECT * FROM nsc_community WHERE users LIKE '%Mike%' and description like '%california%' Upvote 0 Downvote
i am not sure i understand. if you want to filter on nsc_community and description fields: SELECT * FROM nsc_community WHERE users LIKE '%Mike%' and description like '%california%'
Jan 29, 2004 Thread starter #3 Mayoor Programmer Jan 16, 2004 198 GB OK basically the user will enter a search string, and the SQL statement must look in several fields for that string. Mayoor Upvote 0 Downvote
OK basically the user will enter a search string, and the SQL statement must look in several fields for that string. Mayoor
Jan 29, 2004 Thread starter #4 Mayoor Programmer Jan 16, 2004 198 GB Also is there any way i can use a wildcard to represent every field in the database? Upvote 0 Downvote
Jan 29, 2004 #5 rw2003 Programmer Sep 19, 2003 3 GB Try this: SELECT * FROM nsc_community WHERE users LIKE '%Mike%' OR description like '%Mike%' This will search both fields for occurances of '%Mike%' Upvote 0 Downvote
Try this: SELECT * FROM nsc_community WHERE users LIKE '%Mike%' OR description like '%Mike%' This will search both fields for occurances of '%Mike%'
Jan 29, 2004 #6 mimi2 Technical User Apr 2, 2002 407 CA there is a link here to How to search all columns of all tables in a database for a keyword http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm Upvote 0 Downvote
there is a link here to How to search all columns of all tables in a database for a keyword http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm