Search Problem - 11/30/2006 11:12:52
I have a requirement to bring two tables together, I want to add pricing from one table to the data in another table. However, I only want the pricing when the service date in the table without the pricing is later than the effective date in the table with pricing. There a number of pricing records that will match but the they have different effective dates and some maybe later than the one that matches. As that was a rubbish explanation, here is an example:
Table 1
ndc = 99999999 Service Date = 07/23/2005
Table 2
ndc = 99999999 Service Date = 05/28/2005 Price = $0.55 ndc = 99999999 Service Date = 07/01/2005 Price = $0.365 ndc = 99999999 Service Date = 08/28/2005 Price = $0.741
I want to make sure I get the price from record 2 and not record 1 or three.