Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SSIS - Replace Record

0 views
Skip to first unread message

ewm

unread,
Nov 4, 2009, 12:31:01 PM11/4/09
to
In MySQL there is a command that will differentiate between a replace and an
insert. If the data record exists in the database based on the primary key,
an update command is used; however, if the data record does not alreay exist,
the data is inserted using an insert command. Is there a similar command in
SQL Server?

Russell Fields

unread,
Nov 4, 2009, 1:45:30 PM11/4/09
to
If you are using SQL Server 2008 there is the MERGE statement which can be
programmed to do inserts, updates, or deletes.
http://technet.microsoft.com/en-us/library/bb510625.aspx

For earlier versions of SQL Server there is no such command.

RLF

"ewm" <e...@discussions.microsoft.com> wrote in message
news:5AEA3910-EFB4-4C75...@microsoft.com...

0 new messages