If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 date field modification while loading data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-24-09, 08:45
denisvenis denisvenis is offline
Registered User
 
Join Date: Dec 2008
Posts: 29
DB2 date field modification while loading data

Hi,

I want to load the TRASACTION table with the updated values of DT_A and DT_B with input file.

While loading i want to update the values of DT_A and DT_B by 7 days.
Data type of DT_A is smallint and DT_B is date.

How to achieve this?

If there is no other solution to do this in load phase and if you know JCL SORT
through which we can achieve this?

Thanks-
Denis.
Reply With Quote
  #2 (permalink)  
Old 03-26-09, 21:52
db2dummy1 db2dummy1 is offline
Registered User
 
Join Date: Feb 2009
Posts: 114
How about update after loading ... using UPDATE SQL statement (since we know exactly by how much we have to adjust values in these columns)
Reply With Quote
  #3 (permalink)  
Old 03-27-09, 00:19
nick.ncs nick.ncs is offline
Registered User
 
Join Date: May 2007
Location: somewhere in dbforums
Posts: 221
How about modifying the input file during export of that file and specifying the values during export itself. So your EXPORT will be something like
Quote:
EXPORT to ..... ..... ..... select DT_A + 7 , DT_B + 7 days from .....
The only problem here is whether you'll be able to get the input file in that format.
__________________
IBM Certified Database Associate, DB2 9 for LUW
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On