View previous topic :: View next topic
|
Author |
Message |
tirumalg
New User
Joined: 14 Feb 2007 Posts: 6 Location: Bangalore, INDIA
|
|
|
|
Hi All,
I am trying to load the DB2 table using DSNUPROC. One column type in the table is TIMESTAMP and part of the primary key. How can I specify to insert the TIMESTAMP.
Your help is highly appreciated. |
|
Back to top |
|
|
ulfnsc
New User
Joined: 15 Jan 2004 Posts: 19 Location: Stockholm, SWEDEN
|
|
|
|
If you exclude the TIMESTMP column from your DML and from your load-file, the column will get the timestmp from the time when you run
the DSNUPROC.
Uffe |
|
Back to top |
|
|
wanderer
Active User
Joined: 05 Feb 2007 Posts: 199 Location: Sri Lanka
|
|
|
|
I suppose, provided the column was defined as a "WITH DEFAULT". |
|
Back to top |
|
|
vini_srcna
Active User
Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
Quote: |
I am trying to load the DB2 table using DSNUPROC. One column type in the table is TIMESTAMP and part of the primary key. How can I specify to insert the TIMESTAMP. |
You have to give the vaule while during the load. Make sure the dates are in the right format otherwise it would through -181 or -180 series error code.If it is defined as NOT NULL WITH DEFAULT and if it is not required for you to put the value then you may ignore that fields in the load control card. DB2 puts the current timestamp for you.
If you want to laod some value then define that in load control card. ex
TMS1 POSITION( 368 )
TIMESTAMP EXTERNAL( 26) ,
TMS2 POSITION( 394 )
TIMESTAMP EXTERNAL( 26) ,
If you are using the unlaoded data from other table then you have to use EXTERNAL keyword to get rid of conversions. Hope this helps you. Thanks |
|
Back to top |
|
|
|