Can you use REPLACE?

Kelley



Randy Chrismon wrote:

> Please tell me it ain't so...
>
> I am writing a Lotus Nots agent to feed data directly into a MySQL
> table. The agent needs to either insert a new record or update an
> existing record depending on whether a document in Nots is new or
> updated. Because this app may be ported over to a DB2 server, I am
> avoiding the "on duplicate key update" option. So, I intended to test
> for the existence of a MySQL record and, depending on the result,
> prepend either "Update my_table" to a build SQL string, or prepend
> "Insert into table". And then I read the documentation... It looks
> like Update MUST use the set column_1=new_value1,
> column_2=new_value2,
> etc. format. I was hoping to do something like "update my_table
> values(newValue1, newValue2...)" making sure to have a value or
> holder
> for each column. In other words, I was expecting insert and update to
> look pretty much the same except for the prefix and a where clause on
> the end of the update. Am I right that I can't do this??
>
> Thanks.
> Randy
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to