Justin Cooney
Web Development Tips and Examples
Category: SQL Server 2008
-
The idea of an Upsert was added in the SQL 2003 standard for databases and is implemented using a MERGE statement in both Oracle and SQL Server. So You Might Ask: What is an Upsert? An Upsert does pretty much does what it sounds like: it runs an update on a row where a condition…
-
In this article I will review three easy methods that can be used to replace extra spaces between words in a string. Note that if you want to remove extra spaces from the start and end of your string you will still need to encapsulate the output of the routines within the standard LTrim /…
-
The OUTPUT clause is a useful part of your T-SQL arsenal that has been added as of SQL Server 2005. You can use the OUTPUT clause in the same vein as @@IDENTITY, IDENT_CURRENT, or SCOPE_IDENTITY(), or even extend it to be a historical logging mechanism. Unlike @@IDENTITY, or SCOPE_IDENTITY(), you need to populate a table…