473,473 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need help with SQL Select statement using LIKE

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
3 2217
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Radioactive Man | last post by:
anyone know of a function like "raw_input", which collects a string from the user entry, but one where I can set a time limit, as follows: time_limit = 10 # seconds user_answer =...
0
by: B. Fongo | last post by:
I learned MySQL last year without putting it into action; that is why I face trouble in formulating my queries. Were it a test, then you would have passed it, because your queries did help me...
3
by: dumbledad | last post by:
Hi All, I'm confused by how to replace a SELECT statement in a SQL statement with a specific value. The table I'm working on is a list of words (a column called "word") with an index int...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
2
by: clinttoris | last post by:
Hello, If someone could help me it would be appreciated as I am not having much luck. I'm struggling with my asp code and have some questions relating to asp and oracle database. First...
6
by: Twobridge | last post by:
I hope someone can help me out with my problem. I have found a sql statement that basically pulls all bills filed within a certain time period and the payments made on those bills with in the...
0
by: Chuck36963 | last post by:
Hi all, I've been working on a listing problem and I can't figure out how to work it out. I have looked far and wide on the web to find answers, but I'd like other peoples input on my project in...
0
by: NM | last post by:
Hello, I've got a problem inserting binary objects into the postgres database. I have binary objects (e.g. images or smth else) of any size which I want to insert into the database. Funny is it...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.