I have to tables in the following layout:
Order Table:
quantity
currency
date
Currency Table:
rate
date
Is there a way to get the the following is a one select statement w/out using a temp table:
Get the 'quantity', 'rate', 'quantity X rate' based on the date in the order table if the currency = 1. If the date in the order table doesn't exist in the currency table get the rate of previous existing date.
Thanks.
Order Table:
quantity
currency
date
Currency Table:
rate
date
Is there a way to get the the following is a one select statement w/out using a temp table:
Get the 'quantity', 'rate', 'quantity X rate' based on the date in the order table if the currency = 1. If the date in the order table doesn't exist in the currency table get the rate of previous existing date.
Thanks.