SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Merge statement


Merge statement

Author
Message
iBar
iBar
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2940 Visits: 844
Comments posted to this topic are about the item Merge statement
Tom Thomson
Tom Thomson
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39401 Visits: 12880
Good easy question.

Of course it may be that the query processing could order the merge conditions in order of specificity. We did that with the pattern matching conditions of Hope+, maybe Haskell inherited that too [I can't remember; Nic Holt and I certainly suggested it, but it may not have happened] so it's not obviously out of the question - but I haven't examined the semantics of merge conditions to determine whether there is guaranteed always to be a data-independent specificity-based total order on them, and I can't assert it is possible when I haven't done that analysis. If it is possible and straighforward then doing it would make it possible for people to write much more confusing Merge statements, which doesn't sound like a good thing, but it would also make it possible to tack more specific conditions on at the end and there is a good argument that writing conditions in increasing specificity order (instead of in the reverse order, as required by the SQL Merge statement) improves code readability. So what do people think - woul dthat be a good change to SQL or a bad one?

Tom

bitbucket-25253
bitbucket-25253
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26739 Visits: 25280
Nice question ... I learned something from it so THANK YOU

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)

Group: General Forum Members
Points: 110986 Visits: 18623
Nice question. Thanks to DBCC Timewarp we were able to answer the Oct 14 question over a month early. :-D:-D:-D:-D



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

bitbucket-25253
bitbucket-25253
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26739 Visits: 25280
SQLRNNR (9/7/2011)
Nice question. Thanks to DBCC Timewarp we were able to answer the Oct 14 question over a month early. :-D:-D:-D:-D


[? ? ?

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)

Group: General Forum Members
Points: 110986 Visits: 18623
bitbucket-25253 (9/7/2011)
SQLRNNR (9/7/2011)
Nice question. Thanks to DBCC Timewarp we were able to answer the Oct 14 question over a month early. :-D:-D:-D:-D


[? ? ?






Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Attachments
QOTD_Oct142011.jpg (350 views, 9.00 KB)
CoolCodeShare
CoolCodeShare
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1842 Visits: 311
an easy question but informative!
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27318 Visits: 7545
Did someone leave the tachyon drive idling again?Hehe
Time travel causes all sorts of paradoxesw00t
This will be (or was) a good question.

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Tom Thomson
Tom Thomson
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39401 Visits: 12880
SQLRNNR (9/7/2011)
Nice question. Thanks to DBCC Timewarp we were able to answer the Oct 14 question over a month early. :-D:-D:-D:-D

I'was just getting used to seeing Monday questions on the preceding Saturday, nice small 2 day warp which does no harm, but anti-slips of more than a month will take some getting used to.

There's an even bigger time anti-slip on this article and yet bigger again on its successor; I commented on the fomer before I noticed the time discrepancy (several others had commented too) but I noticed the timeslip on its successor when I oicked its discussion up frm "recent posts" and refrained from commenting because with nearly three months to go it could be an early draft. The three preceding articles in that "stairway" also had first posts for their discussions ranging from 1 month to two months before the publication dates. SO articles, discussions, and QoTDs all getting warped backwards in time. How much antimatter is Steve wasting to generate these unintentional (??) warps?

Of course these are still small anti-slips, nowhere near big enough to be useful to the project managers of large UK govt IT projects. w00t

Tom

rfr.ferrari
rfr.ferrari
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3089 Visits: 13645
good question!!!

why is it possible to answer this question? if it should be displayed on Oct. 14!


rfr.ferrari
DBA - SQL Server 2008
MCITP | MCTS

remember is live or suffer twice!
the period you fastest growing is the most difficult period of your life!

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search