[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sapdb-general
Subject:    Problem with LONG and TO_DATE in Insert statement
From:       "Stoedtler, Mathias" <mathias.stoedtler () hp ! com>
Date:       2004-06-30 10:21:25
Message-ID: 878F763D1523BA48A192A94F58C03C3F0339B0AD () rtoexc01 ! emea ! cpqcorp ! net
[Download RAW message or body]

Hi,

I'm trying to create a table with a LONG VARCHAR field and fill it with
data. I'm using MaxDB 7.5.00.14. I'm connected to DB using Oracle SQL
mode in SQL Studio.

	CREATE TABLE testTable1( textfield LONG VARCHAR, datefield DATE)

Creating the table works but when trying to insert data statement fails.

	INSERT INTO testTable1 (textfield ,datefield) VALUES
('Test',TO_DATE('04/27/2000 12:00:00','MM/DD/YYYY 24:MI:SS'))

---- Error -------------------------------
Auto Commit: On, SQL Mode: Oracle, Isolation Level: Committed
Integrity constraint violation;-8006 POS(1) Data types must be
compatible:TEXTFIELD.
INSERT INTO testTable1 (textfield ,datefield) VALUES
('Test',TO_DATE('04/27/2000 12:00:00','MM/DD/YYYY HH24:MI:SS'))


Next statement works:

	INSERT INTO testTable1 (textfield ,datefield) VALUES
('Test',sysdate)


These 2 statements also work fine.

CREATE TABLE testTable (id integer primary key, textfield LONG VARCHAR)
INSERT INTO testTable VALUES (4,'something to fill a long varchar
field')

Inserting a TO_DATE (...) value in a table without a LONG VARCHAR field
also works fine.

Seems that there's a problem inserting into a DATE field with TO_DATE
when a LONG VARCHAR field is in the same table!?

Greets
   Mathias

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/maxdb?unsub=sapdb-general@progressive-comp.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic