Solved

Problem to insert

Posted on 2014-10-22
6
369 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
In today’s complex data management environments, it is not unusual for UNIX servers to be dedicated to a particular department, purpose, or database.  As a result, a SAS® data analyst often works with multiple servers, each with its own data storage…
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now