Sunday, February 19, 2012

INSERT or UPDATE syntax?

Oracle and a few other DB's contain a VERY nice "INSERT OR UPDATE" feature.
In my SQL Server code I have to have large IF blocks in order to replicate
this -- in a trigger or stored proc you don't know in advance which one
you're going to have to do.
Am I missing something here? Is there an easy way to replicate this feature
in SQL Server?
Maury
Nope, it's not there. Send a request for this feature to:
sqlwish@.microsoft.com
"Maury Markowitz" <MauryMarkowitz@.discussions.microsoft.com> wrote in
message news:DC54237D-E872-45A1-86F2-48F29665F9BD@.microsoft.com...
> Oracle and a few other DB's contain a VERY nice "INSERT OR UPDATE"
feature.
> In my SQL Server code I have to have large IF blocks in order to replicate
> this -- in a trigger or stored proc you don't know in advance which one
> you're going to have to do.
> Am I missing something here? Is there an easy way to replicate this
feature
> in SQL Server?
> Maury
|||There is no UPSERT or MERGE.
http://groups.google.com/groups?hl=e...phx.gbl#link1
http://groups.google.com/groups?hl=e...phx.gbl#link1
http://www.aspfaq.com/
(Reverse address to reply.)
"Maury Markowitz" <MauryMarkowitz@.discussions.microsoft.com> wrote in
message news:DC54237D-E872-45A1-86F2-48F29665F9BD@.microsoft.com...
> Oracle and a few other DB's contain a VERY nice "INSERT OR UPDATE"
feature.
> In my SQL Server code I have to have large IF blocks in order to replicate
> this -- in a trigger or stored proc you don't know in advance which one
> you're going to have to do.
> Am I missing something here? Is there an easy way to replicate this
feature
> in SQL Server?
> Maury

No comments:

Post a Comment