473,406 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

INSERT into ... VALUES (TIMESTAMP) problem...

I just receive an error during my CLI ODBC insert statement:
INSERT INTO (.....) VALUES (?, ?, ?, TIMESTAMP( CAST(? AS
VARCHAR(10)),'00:00:00'), ?, ?, ?, ?)";

the ? in the CAST( ) Statement is represented by:
char *go03_btag="10.10.2006";

SQLCODE = -180, SQLSTATE = 22008
MESSAGE: [unixODBC][IBM][CLI Driver][DB2/LINUX] SQL0180N The syntax
of the string representation of a datetime value is incorrect.
SQLSTATE=22007

anyone any idea?
thanks,
Klaus

Dec 18 '06 #1
2 44463
hi,

I tried a sample insert and it worked.

------------------------------ Commands Entered
------------------------------
insert into db2nci.test values (TIMESTAMP(CAST('10.10.2006' AS
VARCHAR(10)),'00:00:00'));
------------------------------------------------------------------------------
insert into db2nci.test values (TIMESTAMP(CAST('10.10.2006' AS
VARCHAR(10)),'00:00:00'))
DB20000I The SQL command completed successfully.

RainDeEr

Dec 18 '06 #2
rAinDeEr wrote:
hi,

I tried a sample insert and it worked.

------------------------------ Commands Entered
------------------------------
insert into db2nci.test values (TIMESTAMP(CAST('10.10.2006' AS
VARCHAR(10)),'00:00:00'));
------------------------------------------------------------------------------
insert into db2nci.test values (TIMESTAMP(CAST('10.10.2006' AS
VARCHAR(10)),'00:00:00'))
DB20000I The SQL command completed successfully.

RainDeEr
May depend on the LOCALE. Try e.g. 10-10-2006

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

WAIUG Conference
http://www.iiug.org/waiug/present/Fo...Forum2006.html
Dec 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: soahil | last post by:
hello I am facing a problem. i have two tables named "BILL_DETAIL" and "COMPANY" both structure is as follws: --------------------- "BILL_DETAIL" --------------------- BILL_ID ...
2
by: Sirisha | last post by:
Hello, I am New to the C#.Net, i want code for insert values into the database.(in C3#.net) Regards, A.Sireesha.
1
by: Sirisha | last post by:
Hello, I want code for insert values into database using storedprocedure and how to write stored procedures. I want code in codebehined file, imean .aspx code Regards,
6
by: kareemaffan | last post by:
Hello Everyone I want to insert values into MS Access database through VB.NET in Visual Studio 2005 . I have used the following code which is not working. Private Sub Button2_Click(ByVal sender...
1
by: menmysql | last post by:
hi to all, i want to insert data into enum fields but i am not able to insert values. can any one help me regarding this regards
1
by: saiswarnalatha | last post by:
How to insert values into FlexGrid Control and save into database and retreive from database? How to pass values from one Flexgrid in one form to another Flexgrid in another form? Do reply soon...
2
by: blitzztriger | last post by:
Hello!! how do i insert values into mysql , after parsing a submiting textbox?? I made the arrays, so this should be a basic insertion of them in the db, but something is missing, or in the wrong...
2
by: jeenajos | last post by:
Hi all, while writing a query to insert values into a database it gave me an error. Query goes like this: Insert into .. ( , ,) Values (<Cargo,Varchar(50),>
7
by: saiindu | last post by:
How to insert values from one jtable to another jtable using arraylist(tokenizer). private void readPreviousValues() { String temps = null; StringTokenizer tokenizer; ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.