Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We copy a lot of data from MS Excel sheets into SQLServer database tables using simple copy + paste over Microsoft SQL Server Management Studio. This procedure works fine if the id of the row to copy over doesn't already exists. But that isn't the case very often: We have thousands of rows in a table and sometimes we need to change only 10 - 20 rows where nothing but a simple text has changed in the row.

So we have to: Locate the rows (that most of the time aren't continous (order by id etc.), delete them and insert the rows with the corrected values.

So I'm wondering: Is there something like a "insert with replace"-hotkey? Like SHIFT + CTRL + V? So that if there's already a row with the same primary key id, it get's overwritten instead of SQL Server Management Studio screaming in pain and fear?

share|improve this question
    
Do it programmatically? –  boburob Jul 16 '13 at 15:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.