Reputation: 23
I am new to SQL and I have a MS-Access database where I want to filter all the data on three types of conditions.
The first condition for the database should be meeting all data in column named "Range-1" which contains: "Information Technology".
The second condition should contain data in column named "Range-2": "Cyber Companies" or "Telecommunications" or "Robotics".
The third condition should contain data in column named "Range-3": "Insurance, Tech" or "Fiber, Optics, Silicon Valley" or "MedTech, InsurTech, FinTech, Infra".
The goal should be a query which fits any of the possible combinations - f.e.: "Information Technology" -> "Telecommunications" -> "MedTech, InsurTech, FinTech, Infra".
The name of the table is mytable
.
I am thankful for any help. :)
Upvotes: 1
Views: 530
Reputation: 1269463
In MS Access the syntax would look like:
select *
from mytable
where [Range-1] in ("Information Technology") and
[Range-2] in ("Cyber Companies", "Telecommunications", "Robotics") and
[Range-3] in ("Insurance, Tech", "Fiber, Optics, Silicon Valley", "MedTech,
InsurTech, FinTech, Infra")
Upvotes: 1
Reputation: 5141
Try below condition.
where Range-1 in ('Information Technology')
and Range-2 in ('Cyber Companies' , 'Telecommunications' , 'Robotics')
and Range-3 in ('Insurance, Tech' , 'Fiber, Optics, Silicon Valley' , 'MedTech,
InsurTech, FinTech, Infra'.
)
Upvotes: 1