All; Using Access 2010. I have the following table:
COST_NO |
ST |
TASK |
1234 |
KY |
TNT |
1234a |
KY |
TNT |
1234b |
KY |
AVT |
1234b |
KY |
TNT |
1234c |
KY |
TNT |
1234c |
IL |
TNT |
1234d |
WA |
TNT |
2345 |
FL |
TNT |
3456 |
AR |
TNT |
3456a |
AR |
TNT |
3456c |
VT |
TNT |
5897 |
WA |
TNT |
6958 |
MO |
TNT |
|
|
|
I would like a query to return only the with the cost_no being the same(match first four) in the same state and the same task. Given the table above; I want this result:
Code:
COST_NO |
ST |
TASK |
1234 |
KY |
TNT |
1234a |
KY |
TNT |
1234b |
KY |
TNT |
1234c |
KY |
TNT |
3456 |
AR |
TNT |
3456a |
AR |
TNT |
This is my qry in progress:
Code:
SELECT tblCostSample.[Cost_no] AS [Cost_No Field], tblCostSample.ST, tblCostSample.TASK
FROM tblCostSample
WHERE (((tblCostSample.[Cost_no])>"3") AND ((tblCostSample.ST)>"1") AND ((tblCostSample.TASK)="TNT") AND ((tblCostSample.TASK)>"1"));
Can anyone assist in what I'm doing wrong pleas