Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Update table if record exists else insert ?

Author  Topic 

OldMySQLUser
Constraint Violating Yak Guru

301 Posts

Posted - 2007-12-17 : 11:30:02
Is there a way to structure a query to update an existing table record if it already exists, otherwise insert a new record into that table?

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-12-17 : 11:32:47
http://weblogs.sqlteam.com/mladenp/archive/2007/07/30/60273.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out
Go to Top of Page

OldMySQLUser
Constraint Violating Yak Guru

301 Posts

Posted - 2007-12-17 : 11:41:27
Many thanks for the educational link :)
Go to Top of Page
   

- Advertisement -