Stoedtler, Mathias wrote:
> 
> 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'))
> 

This missing feature (long-column-value given as literal, not as parameter
plus some functions/arithmetic for other columns in insert...values) will be part of 
the next version.

So far there are two chances:
Get rid of the functions (do it in the application)
Or
Do not specify the long-column-value as literal, specify it as parameter using some 
tool/application.

Elke
SAP Labs Berlin


> 
> 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/[EMAIL PROTECTED]

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to