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 > Copying one Timestamp to another and recieving "Value Too Long" error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-15-07, 07:09
Wim Wim is offline
Registered User
 
Join Date: Nov 2004
Posts: 1,279
Copying one Timestamp to another and recieving "Value Too Long" error

I am copying a timestamp field from one table (the old one) to a timestamp field in another table (the new one that will replace the old one).

Code:
Insert into NEW_TABLE (
	NR_DOC, 
	TS_INPUT
)
SELECT 
	NR_DOC,
	TS_CREATE
FROM OLD_TABLE
;
I receive an error
[IBM][CLI Driver][DB2/NT]SQL0433N Value "2007-05-09-10.15.51.672000" is too long. SQLSTATE=22001

How can the value in one timestamp field be too long to fit in another timestamp field ??

I tried to do a TIMESTAMP(TS_CREATE), in the hope that that would ease DB2 a bit, but that trick didn't work.
__________________
With kind regards . . . . . SQL Server 2000/2005/2008/2008 R2 Earned beers: 16
Wim
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald Knuth
Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages
Reply With Quote
  #2 (permalink)  
Old 06-15-07, 08:28
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
there is an apar talking about this
IY95753: FP14 ONLY
have a look..
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #3 (permalink)  
Old 06-15-07, 08:41
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Do you mind showing us the table definitions? The actual ones?
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