MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Insert the Missing Date Row

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
magopala
Beginner


Joined: 02 Mar 2006
Posts: 4
Topics: 3

PostPosted: Thu Mar 03, 2011 12:51 am    Post subject: Insert the Missing Date Row Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Thu Mar 03, 2011 1:30 pm    Post subject: Reply with quote

magopala,

Please search before posting. Check this link which shows you a method to find the missing date record.

http://www.mvsforums.com/helpboards/viewtopic.php?t=10110&highlight=missing

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group