Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008
    Posts
    29

    Unanswered: 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.

  2. #2
    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)

  3. #3
    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
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •