convert dollar into Indian rupee : Below two table I have with sample data. Table A contains dollar rate(into Indian rupee) as per year and Table B contains amount per year and I want to convert
dollar into rupee as per year.
 

    Table A
    Rate Year
    47   2001
    49   2003
    55   2004

    Table B
    Amt Year
    25$ 2001
    34$ 2002

Question : for first record(year 2001) we have entry in both tables so we can do this easily by using below query

    sel A.Rate*B.Amt from A,B
    where B.year=A.year

But for second record(i.e year 2002) we do not have entry in table A (which is rate table) so for these kind cases I want to use rate value from previous year (i.e : 47 rupee from year 2001)