Ajit Aranha wrote:
>
> Elke,
> can you clarify what the : does in the following?
> insert into test values (..., TO_DATE(...), :longvalue).
>
> Are u saying
> insert into test values (347,TO_DATE('2003/09/30 10:53', 'YYYY/MM/DD
> HH24:MI'),:'asdsadsadas')
> would work.
>
No, as usual for SQL-statements (not given in SQLStudio, but in JDBC/ODBC/...)
which are handled as prepared statements, there will often be a placeholder instead of
the real value. Placeholders are written as :<identifier> or ?.
:'xyz' does not make any sense, will result in syntax error.
> I don't understand what you mean by " or
> how they are named in the environment you are using" ?
What are you using, precompiler, JDBC, ODBC or what else to talk to the database
server?
Elke
SAP Labs Berlin
>
> Please clarify,
>
> Thanks and regards,
> Ajit
>
>
> -----Original Message-----
> From: Zabach, Elke [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 30, 2003 2:52 PM
> To: 'Ajit Aranha'; [EMAIL PROTECTED]
> Subject: RE: Long varchar and date fields don't mix??!!
>
> Ajit Aranha wrote:
> >
> > Sapdb ver 7.3.30
> > Using Oracle mode I encounter this problem (can be reproduced in sql
> > studio or jdbc)
> >
> > CREATE TABLE test
> > (
> > JOBID number(6) NOT NULL,
> > datecolumn date,
> > MESSAGE long varchar,
> > PRIMARY KEY (JOBID)
> > )
> >
> > insert into test values (347,null,'asdsadsadas') -works ok
> >
> > insert into test values (347,TO_DATE('2003/09/30 10:53', 'YYYY/MM/DD
> > HH24:MI'),'asdsadsadas')
> > -fails -8006 data types must be compatible:MESSAGE
> >
> > Why???
> >
>
>
> You are using a function in the insert which causes the insert
> to be handled differently from insert without functions.
>
> Usually you should insert LONG-values using
> parameter/bind-variables or
> how they are named in the environment you are using -->
> insert into test values (..., TO_DATE(...), :longvalue).
>
> This HAS to be done if the insert includes functions as well.
>
> Elke
> SAP Labs Berlin
>
> > Regards,
> > Ajit
> >
> > P.S. I prefer the old plain text format to the current mime mailing
> > format of the list. Can we change back??
> >
> >
> >
> > --
> > 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]