Posted on 2010-01-08
I have two tables. One table shows Corn Future Settlement dates from 1971-2010. This table has 6-10 transactions a day (one for the march contract, one for the may contract, etc.) The other table shows corn transactions of individuals for a given day (e.g. 1996-03-25). I want to find the difference (basis) between the corn contract and the settlement price. The problem I'm having is being able to find the corn contract that needs to be used. For instance, if the transaction happened in March 25, 1996, then I would want to use the March Contract, not the may, aug, dec, contract. I could use a cursor, but was wondering if I could use a join to do this with. Any Sugestions?