Brian,
thanks for the reply.
What I am trying to do is to return an effective dated hourly rate by determining when the work day is between the wage rate effective (beginning) date and expiration date.
The effective dated wage rate is in a table like this:
BASEWAGERTHIST
Employeeid; Basehourlywageamt; EffectiveDTM; ExpirationDTM
The table that is linked to the BASEWAGERTHIST is
KNX_VIEW_WFCTTL_LABOR
Employeeid; ApplyDTM
I am linking on Employeeid, but need to return the Basehourlywageamt where the KNX_VIEW_WFCTTL_LABOR.ApplyDTM falls between the BASEWAGERTHIST.EffectiveDTM and BASEWAGERTHIST.ExpirationDTM.
If there is only one rate in the BASEWAGERTHIST it works fine, but if the table contains multiple rates it is only looking at the first effective dated row and if the KNX_VIEW_WFCTTL_LABOR.ApplyDTM does not fall between that row it stops evualating and returns a rate 0.00.
Does the above make sense?