Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If I have the following tables
Discounts:
Date_Discount Rate
2014.04.01 10
2014.04.02 11
2014.04.05 9
2014.04.06 12
Sales:
Sales_Date Amount
2014.04.01 100
2014.04.02 120
2014.04.03 80
2014.04.04 90
2014.04.05 95
2014.04.06 110
2014.04.07 125
How could i get the following table?
Sales_Date Amount Rate
2014.04.01 100 10
2014.04.02 120 11
2014.04.03 80 11
2014.04.04 90 11
2014.04.05 95 9
2014.04.06 110 12
2014.04.07 125 12
Its pretty much the same what enrique has done. Instead I have done a left join.
is this ?
Its pretty much the same what enrique has done. Instead I have done a left join.
My question is: How do union
Where there is no discount for the Sales_date, take off immediately above.
Thank you, Suraj
Thank you, Enrique.
I did not see the attachment
How could i do something more dynamic?