| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| 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. |
|
#2
|
| On Aug 22, 10:49*am, "Tony Woo" > 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. |
![]() |
| Thread Tools | |
| Display Modes | |