Slacktivism
There are no magic answers, no miraculous methods to overcome the problems we face, just the familiar ones: honest search for understanding, education, organization, action that raises the cost of state violence for its perpetrators or that lays the basis for institutional change -- and the kind of commitment that will persist despite the temptations of disillusionment, despite many failures and only limited successes, inspired by the hope of a brighter future."... Noam Chomsky




Cheers and Jeers
Images
Powered by Squarespace
« The DB2 LOAD process | Main
Thursday
01Mar2007

Load Timestamp data in a flat file source column into a DB2 Timestamp target column

 Being in IT and all, this is a new journal, where I post (collect) information that pertains to stuff I find useful at work.

Load Timestamp data in a flat file source column into a DB2 Timestamp target column

To load data in a flat file into a DB2 target Timestamp column do the following:

  1. Set the datatype of the column in the Source Definition as String with a precision of 26.
  2. Set the datatype of the target column in the DB2 database table to Timestamp.
  3. Set the datatype of this column in the Target Definition to be Char with a precision of 26.
    Note:

    This is datatype setting is only used within the PowerCenter Designer.DB2 can implicitly convert from character datatype to Timestamp datatype.

     

    The implicit conversion in DB2 requires that the string passed by the PowerCenter session must be in the exact format required by the Timestamp column as specified in the territory and codepage used to create the database.

    To determine the format, execute the following command on the DB2 Command Line window:

    VALUES current timestamp

    Here is an example of the output:

    yyyy-mm-dd-hh.mi.ss.nnnnnn

PrintView Printer Friendly Version

Reader Comments (1)

hi,

i tried this. i get this error message. what data type should my port be?

Severity Timestamp Node Thread Message Code Message
ERROR 12/03/2008 11:53:27 AM node01_dietl11 WRITER_1_*_1 WRT_8229 Database errors occurred:
[Informatica][SCLI PWX Driver] PWX-00136 DBAPI Error. Requested conversion from STRING to TIMESTAMP for table TABLE_NAME column __PARAM0001 is invalid.
[Informatica][SCLI PWX Driver] PWX-07029 A permanent error has been encountered for this statement
December 3, 2008 | Unregistered Commentersuresh

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.