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 > Informix > How to store 3 digit millisecond values

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-04-05, 12:11
jborn jborn is offline
Registered User
 
Join Date: Feb 2004
Posts: 12
Question How to store 3 digit millisecond values

When attempting to run the following SQL:

INSERT INTO table_a (effective_date, priority) VALUES ('2005-10-04 00:00:00.000', 3)

I get the following error message:

ERROR CODE: -1264
Extra characters at the end of a datetime or interval

I have tried this with ifxjdbc.jar version 2.20 JC2, 2.21.JC6, and 3.00.JC2.

I can get statement to run without an error if I run the following SQL

INSERT INTO table_a (effective_date, priority) VALUES ('2005-10-04 00:00:00.0', 3)

Removing the last two zeros in the millisecond range allows the statement to run.

Any ideas on what else to check? Is this a server problem and not a driver problem? Does Informx allow 3 digit in the millisecond range?

Thanks in advance,

jb
Reply With Quote
  #2 (permalink)  
Old 10-04-05, 12:30
blackguard blackguard is offline
Registered User
 
Join Date: Sep 2002
Posts: 102
The effective_date column should be created as:
DATETIME year to fraction(3)
Reply With Quote
  #3 (permalink)  
Old 10-04-05, 14:08
jborn jborn is offline
Registered User
 
Join Date: Feb 2004
Posts: 12
That solves that problem.

Thanks,

jb
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