tahirih
asked on
Access Select Criteria with Wildcards
I would like to select two or more criteria, in Query Design View, using two or more criteria.
For example:
1. Medicare
2. Managed Medicare
3. Medicaid
5. Medicaid Out of State
I have attempted using a Wildcard, in the Criteria screen, where I use *Medicare and *Medicaid, in order to retrieve all these records.
Like "Medicaid" Or Like "Medicaid" - did not work either.
Please offer suggestions, with what to enter in the "Criteria" section of the Query Design View Table.
Thanks.
For example:
1. Medicare
2. Managed Medicare
3. Medicaid
5. Medicaid Out of State
I have attempted using a Wildcard, in the Criteria screen, where I use *Medicare and *Medicaid, in order to retrieve all these records.
Like "Medicaid" Or Like "Medicaid" - did not work either.
Please offer suggestions, with what to enter in the "Criteria" section of the Query Design View Table.
Thanks.
Example:
SELECT Table1.*, Table1.FIELD2
FROM Table1
WHERE (((Table1.FIELD1)="Medicar e" Or (Table1.FIELD1)="Medicaid" ));
mx
SELECT Table1.*, Table1.FIELD2
FROM Table1
WHERE (((Table1.FIELD1)="Medicar
mx
minor correction:
SELECT Table1.*
FROM Table1
WHERE (((Table1.FIELD1)="Medicar e" Or (Table1.FIELD1)="Medicaid" ));
mx
SELECT Table1.*
FROM Table1
WHERE (((Table1.FIELD1)="Medicar
mx
ASKER
This did not work.
In the "Criteria" section, I place
Like "%Medicare" OR Like "%Medicaid"
Please also not that the Medicare or the Medicaid does not always have to be first in the string value. Therefore, please allow flexibility for the location of these two workds within the string
Thanks
In the "Criteria" section, I place
Like "%Medicare" OR Like "%Medicaid"
Please also not that the Medicare or the Medicaid does not always have to be first in the string value. Therefore, please allow flexibility for the location of these two workds within the string
Thanks
ASKER
In this instance, please how I would add this into "Criteria" in Query Design View. Thanks.
can you post the SQL from the query design you have now ?
mx
mx
>>This did not work.<<
Huh? This is meaningless.
1. Did you get an error. If so, what was the error.
2. Where the results not what you wanted, if not what were the results output and what were the desired results.
3. Did smoke come out of your monitor.
>>In the "Criteria" section, I place
Like "%Medicare" OR Like "%Medicaid"<<
Since you are obviously not using ADO why are you using %?
Huh? This is meaningless.
1. Did you get an error. If so, what was the error.
2. Where the results not what you wanted, if not what were the results output and what were the desired results.
3. Did smoke come out of your monitor.
>>In the "Criteria" section, I place
Like "%Medicare" OR Like "%Medicaid"<<
Since you are obviously not using ADO why are you using %?
ASKER
Ok, I have gotten it to work partially myself. The following works in the "Criteria" box in Query Design:
Like "*Medicare*" Or Like "*Medicaid*"
So, I am retrieving all records that have these anywhere in the cell. However, I want o exclude anythign that says "Railroad Medicare" from this subset list.
Please advise.
Thanks
Like "*Medicare*" Or Like "*Medicaid*"
So, I am retrieving all records that have these anywhere in the cell. However, I want o exclude anythign that says "Railroad Medicare" from this subset list.
Please advise.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Database, I have request the question to be re-opened, since I awarded points pre-maturely, before seeing your last postin. Thanks.
ASKER
AcPerkins, what I did on my own was to include the second * so that the placement of Medicare/Medicaid cound be anywhere in the string.
Thanks.
Thanks.
ASKER
Thanks.
YourColumn LIKE "*Medicare" Or YourColumn Like "*Medicaid"
Using ADO:
YourColumn LIKE "%Medicare" Or YourColumn Like "%Medicaid"