Solved

Problem to insert

Posted on 2014-10-22
6
391 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 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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
LVL 10

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

Independent Software Vendors: 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!

Question has a verified solution.

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

Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
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…

737 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