|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
AW: TO_DATE and LONG columns
From: Zabach, Elke (elke.zabach
sap.com)
Date: Wed Jul 07 2004 - 08:55:17 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Stoedtler, Mathias wrote:
>
> Hello all,
>
> Can anyone tell me why an insert statement fails when using the TO_DATE
> function and same time inserting into a LONG VARCHAR column in the same
> statement.
>
> Is this a bug or an expected behavior?
It is the expected behaviour if the value of the LONG-column is given as
String_literal like
Insert tab VALUES ('test', TO_DATE(...) )
If you will use JDBC/ODBC or the like and use parameter for the LONG-value
(as usually needed as usually you will not include looooooong LONG-values
by hand) like
insert tab values (:longparam, TO_DATE (...) )
this will work.
Elke
SAP Labs Berlin
>
> Regards,
> Mathias
>
>
> ---- 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'))
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]