Comparing Rows in a Table

I

imcphers

Hi,

I have a table full of employees and transactions with an effective date and
sequence. I want to be able to compare all rows for an employee and
determine if the grade changed on any of the rows. Ideas?

Thanks much!
 
J

John Vinson

Hi,

I have a table full of employees and transactions with an effective date and
sequence. I want to be able to compare all rows for an employee and
determine if the grade changed on any of the rows. Ideas?

Thanks much!

I'm GUESSING that a Self Join query would work here: create a query by
adding the table to the query design window twice. Join the two
instances by EmployeeID. You may want to join the Employee table to
one of the instances as well, if you want to see the employee name.

Use a criterion on Table_1.Grade (Access will alias the second
instance of the table by appending _1 to its name) of

<>
.[Grade]

and, if the sequence number is consecutive, also put a criterion on
[Table_1].[Sequence] of

=
.[Sequence] + 1

to get only consecutive transactions.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top