Hello everybody...

I have a table with 3 columns (companyno, discountgroup, discount) it can
look like this

companyno, discountgroup, discount
12345    ,    1    ,    10
12345    ,    2    ,    20
12345    ,    3    ,    0
98765    ,    1    ,    15
98765    ,    2    ,    10

Can I use the REPLACE command to replace a line with a unique combination of
companyno, discountgroup?

If a discount value don't exist for that company and discountgroup I want to
insert one. I saw the REPLACE command and that seems perfect but is it
possible with two diffrent columns? Can I do this with one query or do I
have to do a DELETE..INSERT query?




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to