View previous topic :: View next topic |
Author |
Message |
magopala Beginner
Joined: 02 Mar 2006 Posts: 4 Topics: 3
|
Posted: Thu Mar 03, 2011 12:51 am Post subject: Insert the Missing Date Row |
|
|
Hi
I need some help with this querey.
Its a simply select from a table.
***** Code: |
SELECT DATE_EXCHANGE
,1/SELL_RATE
,SELL_RATE_EXP
FROM XXXX.VI_CURR_CONV_RATES
WHERE CURR_CONV_FILE_NO = 0
AND DATE_EXCHANGE BETWEEN '2010-05-18' AND '2010-08-31'
AND CURNCY_ALPHA_FROM = '2YY'
AND CURNCY_ALPHA_TO = '9YY'
FOR FETCH ONLY WITH UR |
****
Now here is my requirement. In between the dates '2010-05-18' and '2010-08-31' if some dates are missed out, i would like to take the latest date values and give me the result
For example if querey gives me result as
Code: |
DATE_EXCHANGE 1/SELL_RATE SELL_RATE_EXP
2010-05-18 0.0000777 9
2010-05-19 0.0000788 9
2010-05-21 0.0000776 9
|
It should actually give the result as
Code: |
DATE_EXCHANGE 1/SELL_RATE SELL_RATE_EXP
2010-05-18 0.0000777 9
2010-05-19 0.0000788 9
2010-05-20 0.0000788 9 (Latest data filled in)
2010-05-21 0.0000776 9 |
|
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|