On Aug 22, 10:49 am, "Tony Woo" wrote:
> Hi,
> I'm new on useing ASE 15 and I would like to use the statement similar
> to MySQL's REPLACE statement.
> I have surfed the web and found the article "MySQL to Sybase ASE
> Migrtion Guide", it said INSERT....ON EXISTING UPDATE as equivalent to
> MySQL's REPLACE. However, I got the syntax error when I input something like
> INSERT INTO table(key, field12) ON EXISTING UPDATE VALUES(1,2).
> am I using the statement in the wrong way? Is there any alternative
> way for MySQL's REPLACE?
>
> Thanks.
Unfortunately, I believe that document is in error. It may be the
author confused
ASE and Adaptive Server Anywhere (which I think has that command).
The alternative would be to use and update followed by an insert where
not exists.
>> Stay informed about: Using ON EXISTING UPDATE on ASE