|
Ian
wrote:
> Hi
there,
> > Just converted an SQL server DB over to SAP DB and things are looking really good now, > I expected I would need to ensure all my querys from my program work and expected to > have to update a few - anyway I got problems with this one which is really trivial... > > > SELECT UserID, Extension, Type, Hookstate, '<ACD CALL>0' AS ACDcall, Data + 1 AS Data > FROM Extension WHERE Data ='3' > > > It works in SQL Server and MySQL .. it seems it doesn't like the data+1. > If I remove the +1 then it works.. I tried surrounding it with brackets but > it still doesn't work > > > Any ideas??? 1. please do
not just say ' it does not work'. It is really helpful
for diagnostic needs to know, how this 'not-working'
is found out:
which error occured, the errorposition (if possible),
additional
info returned with the error.
2. If I see,
that you compare Data with the string_literal '3', I assume that Data is
a column of datatype char (n).
And why do you want to add the value 1 to a
character-value ?
3. Oracle does
allow this ... behaviour, it converts implicitly character (if
possible)
to numbers and vice-versa. It does the work of users
who are not willing / able
to work correctly with the datatypes they specified
for their tables.
For this reason we are forced to do this implicit
conversion, too, in SQLMODE Oracle only.
4. Depending on
the value of Data (not being a character-representation of a number for
example)
an error will occur.
Please tell us
the error which occured, check the datatypes and/or provide the table
definition
of Extension to
be able to check what happens.
Elke
SAP Labs
Berlin
|
