Solved

Problem to insert

Posted on 2014-10-22
6
400 Views
Last Modified: 2014-10-23
Hi,
when doing this
insert into kyccusi (EVENT_TIMESTAMP,EVENT_TYPE,ITE_UNIT,BASIC_NO,ITE_NAME,OPEN_DATE,CLOSE_DATE,ITE_TYPE,DEFAULT_BRANCH,ITE_GROUP,PARENT_COUNTRY,RESIDENCE_COUNTRY,INDUSTRY) values ('2014-08-14 09:50:55.277','A','A2B','100133','P3 ','1993-08-27','1900-01-01','PI','CB  ','      ','A2','A2','OTHER PRIVATE PURPOSES             ')

Open in new window

within AS 400 DB2, I get this error.

insert into kyccusi                                                  
(EVENT_TIMESTAMP,EVENT_TYPE,ITE_UNIT,BASIC_NO,ITE_NAME,OPE 
N_DATE,CLOSE_DATE,ITE_TYPE,DEFAULT_BRANCH,ITE_GROUP,PARENT 
_COUNTRY,RESIDENCE_COUNTRY,INDUSTRY) values ('2014-08-14             
09:50:55.277','A','A2B','100133','P3                       
','1993-08-27','1900-01-01','PI','CB  ','      ','A2','A2','OTHER    
PRIVATE PURPOSES             ')                                      

Open in new window

Syntax of date, time, or timestamp value not valid.                  

how to correct the above?
0
Comment
Question by:HuaMinChen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 27

Expert Comment

by:tliotta
ID: 40398577
How is the statement executed? The timestamp and date values work for me, but I don't know your database definitions nor anything about how your statement is processed.

Tom
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 40398601
Many thanks. I use "strsql" to run that. how to extract the relevant table structure to you?
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 40398630
Sorry. Here is the table structure
 Seq  Field              File               Type                 Length  Scale  
      EVENT_TIMESTAMP    KYCCUSI            TIMESTAMP                           
      EVENT_TYPE         KYCCUSI            CHARACTER                 1         
      ITE_UNIT           KYCCUSI            CHARACTER                 3         
      BASIC_NO           KYCCUSI            CHARACTER                 6         
      ITE_NAME           KYCCUSI            CHARACTER                35         
      OPEN_DATE          KYCCUSI            DATE                                
      CLOSE_DATE         KYCCUSI            CHARACTER                10         
      ITE_TYPE           KYCCUSI            CHARACTER                 2         
      DEFAULT_BRANCH     KYCCUSI            CHARACTER                 4         
      ITE_GROUP          KYCCUSI            CHARACTER                 6         
      PARENT_COUNTRY     KYCCUSI            CHARACTER                 2         
      RESIDENCE_COUNT >  KYCCUSI            CHARACTER                 2         
      INDUSTRY           KYCCUSI            CHARACTER                35         
      OFFICER            KYCCUSI            CHARACTER                35         
      UPDATE_STATUS      KYCCUSI            CHARACTER                 1       

Open in new window

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Author Comment

by:HuaMinChen
ID: 40398680
Any other help? thanks
0
 
LVL 18

Accepted Solution

by:
Dave Ford earned 500 total points
ID: 40399640
What is the date-format and time-format in you interactive SQL session. (You can check that using F13 and select 1 for "Change session attributes"). For example, mine is *ISO.

-- DaveSlash
0
 
LVL 18

Expert Comment

by:Dave Ford
ID: 40399665
I believe your timestamp value should be: ''2014-08-14-09.50.55.277000'
0

Featured Post

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question