intelogent
asked on
query for two fileds a table multiple values
I am trying to write a query which will return records in a table that
The “expire” field has a value of all dates of 2014
The “ Compcode” field has values of "220,12345,king,348,346"
I only know how to use the design grid, and listed in the grids as follows:
The first column shows the table, and a ck mark so that all fields of the table will be in the result.
In the next column of the design grid, it shows the expire filed of this table, on the criteria line >#12/31/2013# And <#1/1/2015# this works just fine by itself.
Things start going whack o when I try to further filter the query by another field.
What should be in the next column of the design grid, which specifies the “compcode” field , should I be using the “critera “ line or the “ or” line ?
Should my values separated by commas, the words “or”, the words ”and”
I am lost, Any help appreciated
The “expire” field has a value of all dates of 2014
The “ Compcode” field has values of "220,12345,king,348,346"
I only know how to use the design grid, and listed in the grids as follows:
The first column shows the table, and a ck mark so that all fields of the table will be in the result.
In the next column of the design grid, it shows the expire filed of this table, on the criteria line >#12/31/2013# And <#1/1/2015# this works just fine by itself.
Things start going whack o when I try to further filter the query by another field.
What should be in the next column of the design grid, which specifies the “compcode” field , should I be using the “critera “ line or the “ or” line ?
Should my values separated by commas, the words “or”, the words ”and”
I am lost, Any help appreciated
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.
Ok, the suggestion Scott McDaniel posted should do the trick for you. On the same criteria line but under the compcode field add the following:
IN ('220','12345','king','348 ','346')
ET
IN ('220','12345','king','348
ET
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i would like to return all records which have a compcode expiring in 2014.
the records are insurance policies. and the compcode are certain insurance companies.
so what i am returning is for all policies written last year with each of these companies. i am guessing that is " OR"