cristianivanoff
Technical User
Hello all!
I have a problem joining two tables with date ranges. Maybe anybody here can give a suggestion how to solve this problem.
I have two tables,Tab1 and Tab2, and I would like to join them and get the resulting table Result.
Any suggestion is appreciated!
Br
cristian
Tab1:
SubsID,ObjectID,StatusID,BValidFrom,BValidTo
220,9898,1,20080801,20080819
220,9898,2,20080820,20080902
Tab2:
SubsID,KamID,CValidFrom,CValidTo
220,1020,20080701,20080823
220,1030,20080824,20081001
Result:
SubsID,ObjectID,KamID,StatusID,ValidFrom,ValidTo
220,9898,1020,1,20080801,20080819
220,9898,1020,2,20080820,20080823
220,9898,1030,2,20080824,20080902
I have a problem joining two tables with date ranges. Maybe anybody here can give a suggestion how to solve this problem.
I have two tables,Tab1 and Tab2, and I would like to join them and get the resulting table Result.
Any suggestion is appreciated!
Br
cristian
Tab1:
SubsID,ObjectID,StatusID,BValidFrom,BValidTo
220,9898,1,20080801,20080819
220,9898,2,20080820,20080902
Tab2:
SubsID,KamID,CValidFrom,CValidTo
220,1020,20080701,20080823
220,1030,20080824,20081001
Result:
SubsID,ObjectID,KamID,StatusID,ValidFrom,ValidTo
220,9898,1020,1,20080801,20080819
220,9898,1020,2,20080820,20080823
220,9898,1030,2,20080824,20080902