Connecting Tech Pros Worldwide Help | Site Map

A2K3: query to return lowest of two sets of dates

jnikle@gmail.com
Guest
 
Posts: n/a
#1: Mar 13 '06
I have a list of dates corresponding to department transfers and
terminations. The list for a given employee may look something like
this:

1/1 - Dept A
2/1 - Dept B
3/1 - Quit
4/1 - Debt A
5/1 - Dept C
6/1 - Term'd

I need to have a query that will pick out 1/1 and 4/1, as those would
be hire dates. For tables I have tbl_employee_info, tbl_term_history,
and tbl_dept_history. At this point, I've got the EmployeeID, term
dates, and the very first date like this:

1 3/1 1/1
1 6/1 1/1

What I need is:

1 3/1 1/1
1 6/1 4/1

Does anyone have any idea how I'd go about this? Hope all of this
makes sense.

-Josh Nikle

m2thompson@gmail.com
Guest
 
Posts: n/a
#2: Mar 13 '06

re: A2K3: query to return lowest of two sets of dates


Please post our SQL code, as this will help. Looks like you might not
have joined the two tables correctly.

Closed Thread