ButtonDownBobby
asked on
SQL Non Unique ID on Left joined with Non Unique ID on Right. Need 1 to 1 join.
Table1
1 01/01/2000
1 02/01/2000
1 03/01/2000
Tabel2
1 01/01/2001
1 02/01/2001
1 03/01/2001
1 04/01/2001
1 05/01/2001
1 06/01/2001
What I would like to do is take the values of Table1 and match the non unique id (in this case it's '1') with the earliest date to the earliest dates in Table2. It should be a 1 to 1 relationship.
Example of desired output: (Table1 values = Table2 Values)
1 01/01/2000 = 1 01/01/2001
1 02/01/2000 = 1 02/01/2001
1 03/01/2000 = 1 03/01/2001
So I need the cardinality of Table1(3 items) to match the output and ignore the other values.
I'd like to do this without pointers.
1 01/01/2000
1 02/01/2000
1 03/01/2000
Tabel2
1 01/01/2001
1 02/01/2001
1 03/01/2001
1 04/01/2001
1 05/01/2001
1 06/01/2001
What I would like to do is take the values of Table1 and match the non unique id (in this case it's '1') with the earliest date to the earliest dates in Table2. It should be a 1 to 1 relationship.
Example of desired output: (Table1 values = Table2 Values)
1 01/01/2000 = 1 01/01/2001
1 02/01/2000 = 1 02/01/2001
1 03/01/2000 = 1 03/01/2001
So I need the cardinality of Table1(3 items) to match the output and ignore the other values.
I'd like to do this without pointers.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ButtonDownBobby, do you still need help with this question?
Open in new window