Julian Scarfe wrote: > I'm keeping config information for an application in a series of > related tables. I'd like a command that INSERTs data if it's new, < or UPDATEs it if the key is duplicated. Write a stored procedure called something like InsertUpdateConfigData. Pick the operation that you think is most likely to occur more often (the insert or update). Code that as the initial statement. Then create an exception block, and in that exception block catch the error that would result from the initial statement being executed in the case where the other one should have been; then execute that other statement. There is no magic database-provided SQL statement that says "try an insert and if that fails then try an update." You have to do that yourself. -- Guy Rouillier