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?
MauryNope, 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=en&lr=&ie=UTF-8&frame=right&th=1bf4ff435f7820e3&seekm=uPfJ7%23jIEHA.2972%40TK2MSFTNGP12.phx.gbl#link1
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&th=cd0d91928e55b810&seekm=%23%241tZm0nEHA.3520%40TK2MSFTNGP11.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