Comparing data from the same table

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

How can you compare data from the same table.
I have one Id Number and many action codes for the ID
Number. What I am looking for is the Id Number which has
a action code of "07" with no other action codes aquired.
Example
Id Number 123456: action code 07
Id number 123456: action code 01
Id number 654321: action code 07
Id number 789123: action code 07
Id number 789123: action code 02

The only Id number I want to see is 654321
Where and what do I do to see this data?
 
Nick,

You can do this in a query. Make a query based on the table as you have
described. In the Criteria of the Action Code column, enter "07". In
the Criteria of the Id Number column, put...
Not In(SELECT [IdNumber] FROM YourTable WHERE [action code]<>"07")
 
Thanks,
-----Original Message-----
Nick,

You can do this in a query. Make a query based on the table as you have
described. In the Criteria of the Action Code column, enter "07". In
the Criteria of the Id Number column, put...
Not In(SELECT [IdNumber] FROM YourTable WHERE [action
code] said:
--
Steve Schapel, Microsoft Access MVP

How can you compare data from the same table.
I have one Id Number and many action codes for the ID
Number. What I am looking for is the Id Number which has
a action code of "07" with no other action codes aquired.
Example
Id Number 123456: action code 07
Id number 123456: action code 01
Id number 654321: action code 07
Id number 789123: action code 07
Id number 789123: action code 02

The only Id number I want to see is 654321
Where and what do I do to see this data?
.
 
Back
Top