SQL date range calculation
===

I have two tables one contain dates (startdate and EndDate) and rate and the other transaction table have dates and amount. I want get transactions between startdate and enddate in the transactions table and divide them rates for that period. e.g

table rate
startdate   enddate      rate
2011-01-01  2011-01-03   40.00
2011-01-07  2011-01-10   10.00

Table Transaction

date            Amount
2011-01-01      500.00
2011-01-02      160.00
2011-01-02      140.00
2011-01-03      600.00
2011-01-07      920.00
2011-01-10      1600.00


Results
date            Amount
2011-01-01      500.00/40 
2011-01-02      160.00/40
2011-01-02      140.00/40
2011-01-03      600.00/40
2011-01-07      920.00/10
2011-01-10      1600.00/10