Advertisement

06.11.2008 at 10:05PM PDT, ID: 23478345
[x]
Attachment Details

SQL - search multiple strings

Asked by peterdarazs in SQL Query Syntax

Hi Experts

I'm having some difficulty adding strings to an existing, functioning query.  It should read  where PP_Problem contains string1 or string 2 but i get syntax errors whichever way i try this.

PS using the word OR instead of a comma returns all the records without filtering any of the strings

Many thanks

Peter

Start Free Trial
1:
2:
3:
4:
5:
this works 
SQL = SQL & " where [PP_Problem] like '*String1*' "
 
this one doesn't 
SQL = SQL & " where [PP_Problem] like '*String1*' , '*String2*'"
[+][-]06.11.2008 at 10:18PM PDT, ID: 21766330

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: SQL Query Syntax
Sign Up Now!
Solution Provided By: msfletch
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.11.2008 at 10:20PM PDT, ID: 21766339

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628