By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,966 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,966 IT Pros & Developers. It's quick & easy.

Need help with SQL Select statement using LIKE

P: n/a
I'm not certain if it is possible to do this, and if it is I don't know
what the syntax would look like.

I am currently using a statement like so:

Set rs1 = CurrentDb.OpenRecordset("Select * from tblJudges WHERE Name
Like ""*" & myTerm & "*""", dbOpenDynaset)
What I would like to do is build this select statement such that it
selects records that are LIKE several different variables. Something
like: LIKE "a" OR LIKE "b" OR LIKE "c", so that it returns all records
that are like a,b and c.
Any help would be appreciated,

Thanks,

Jody Blau

Feb 23 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Br
jodyblau wrote:
I'm not certain if it is possible to do this, and if it is I don't
know what the syntax would look like.

I am currently using a statement like so:

Set rs1 = CurrentDb.OpenRecordset("Select * from tblJudges WHERE Name
Like ""*" & myTerm & "*""", dbOpenDynaset)
What I would like to do is build this select statement such that it
selects records that are LIKE several different variables. Something
like: LIKE "a" OR LIKE "b" OR LIKE "c", so that it returns all
records that are like a,b and c.


Um, didn't you just answer your own question?

WHERE [Name] Like '*" & myTermA & "*' Or [Name] Like '*" & myTermB & "*'"
etc.

?
--
regards,

Br@dley
Feb 23 '06 #2

P: n/a
I suppose I did and just didn't realize it. I am fairly new at this
stuff.

I do, however, appreciate that you provided me with the proper syntax.

Thanks,

Jody

Feb 23 '06 #3

P: n/a
Br
jodyblau wrote:
I suppose I did and just didn't realize it. I am fairly new at this
stuff.

I do, however, appreciate that you provided me with the proper syntax.

Thanks,

Jody


No worries:)
--
regards,

Br@dley
Feb 23 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.