Metalteck
asked on
New and Previous Values in a Query
In my report, I have to have 2 fields, one that's called previous department and the other is called new department for an employee.
That database stores this value in a field called A_Value.
Ex:
Emp Dept
12345 91204
12345 93000
My question is how can I have all this information displayed on 1 line?
Expected result:
Emp Old Dept New Dept
12345 93000 91204
Thanks for all you help guys
That database stores this value in a field called A_Value.
Ex:
Emp Dept
12345 91204
12345 93000
My question is how can I have all this information displayed on 1 line?
Expected result:
Emp Old Dept New Dept
12345 93000 91204
Thanks for all you help guys
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ok, so in your original table, you would have these fields:
perhaps the few last questions to ask before suggest a solution...
is that possible for an employee to have more than 2 records in this table?
do you only want to compare the last 2 records in your table per employee?
- Sequence_number
- Emp
- Dept
- Effect_Date
perhaps the few last questions to ask before suggest a solution...
is that possible for an employee to have more than 2 records in this table?
do you only want to compare the last 2 records in your table per employee?
ASKER
Yes, an employee can have multiple records in this table.
Ideally, I would want to compare the most recent effect date and the corresponding sequence number.
Ideally, I would want to compare the most recent effect date and the corresponding sequence number.
ASKER
Any suggestions on how to resolve this with my last answer?
can you provide some sample data here? perhaps a screenshot wil do.
and what's the database you're using?
and what's the database you're using?
ASKER
Question no longer needed.
ASKER
Effect_Date and Sequence number help determine it.
Effect date is a date time field and sequence number is a number field.
Ex: Seq
6/12/2016 1
6/12/2016 2