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
Solved

Problem to insert

Posted on 2014-10-22
6
377 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
  • 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 10

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 10

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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 10

Author Comment

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

Accepted Solution

by:
daveslash 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:daveslash
ID: 40399665
I believe your timestamp value should be: ''2014-08-14-09.50.55.277000'
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

837 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